Page MenuHomePhorge

Fix most PHP 8.1 issues
Needs ReviewPublic

Authored by MacFan4000 on Dec 7 2021, 14:16.

Details

Reviewers
None
Group Reviewers
Blessed Committers
Restricted Owners Package(Owns No Changed Paths)
Maniphest Tasks
T15064: Make phorge compatible with PHP 8.1
Summary

This fixes most issues with PHP 8.1. Some issues still remain that I was unable to fix.

Test Plan

Used PHP linting, tested in browser, checked logs, etc

Diff Detail

Repository
rP Phorge
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

Owners added a reviewer: Restricted Owners Package.Dec 7 2021, 14:16

I've been think about what to do with this for a while, and I have to say, it's a hard one.

First, thanks for doing this, this is definitively needed. But in its current form, it is effectively impossible to review. There are changes to js files, which I think is a clear indication that this is likely automated.

This patch suppresses the deprecation errors at each site, but there might be a simpler workaround in the same spirit: change the error_reporting calls (of which there are only a handful) to exclude E_DEPRECATED. That would risk masking any other deprecations (probably fine in production, but not in development), whereas this patch risks hiding any non-deprecation errors at these locations.

Depending on how the allow_null RFC is handled, Phabricator/Phorge could potentially need no code changes, except to make it refuse to run on PHP 8.1.

Yeah if that RFC passes then that would make things way easier. And yes I used sed for a lot of the changes.