Bug #9068
closedPHP 7.2 compatibility
0%
Description
We need to move toward full PHP 7.2 compatibility across our codebase. The target for this is late spring; I'll put this ticket into the 1.13 milestone for the time being.
The number one concern is eliminating fatal errors. Between our current version (5.6.x) and 7.2, there are a number of hard deprecations and removals. See https://secure.php.net/manual/en/migration72.php and the corresponding 7.1 and 7.0 pages for more info.
Much of this work can probably be done with an existing linter, like https://github.com/sstalle/php7cc. The linter will need to be configured to ignore certain parts of the codebase, such as bbPress legacy bundled with BP.
Where possible/convenient/worthwhile, we'll make an attempt to pass compatibility patches to upstream plugin developers. When plugins are abandoned, we can patch locally and call it good enough. In some cases, we may take this opportunity to disable or remove certain plugins/themes. We'll take this on a case-by-case basis.
We'll also likely need a tool that enforces PHP 7.2 compatibility across the codebase after updates. We don't want to patch a plugin only to have a future update to that plugin reintroduce an incompatibility. One idea here is to run a linter in a Travis CI task, which would email us when bad code is committed. But this would require some changes to our deployment process, since we'd need time for the linting to complete.
We should scour the internet to look for people who have done this with large WordPress codebases, as it's likely that we can borrow much or all of others' work.
Let's use this ticket to start gathering ideas.
Related issues