Questions about how to handle the PHP 8 compatibility upgrade

Can someone who understands the situation with PHP 8 (current top priority) explain it please?

  • What has to be done?
  • Why?
  • And how we may organize to do it?
    • Is it something that can be achieved in small chunks?
    • And hence by multiple people working on different chunks?
    • Or does it have to be done all at once?
    • What is the most efficient approach to take?

Thanks.

PHP keeps evolving. PHP itself uses semvar, so changing from PHP 7 to PHP 8 implies breaking changes. And PHP has a limited lifetime for security issue support.

Our code does not have to use newer language features. But, the PHP folks have changed things so that existing code can throw errors in newer PHP versions.

WP has already handled most of the problems with PHP 8.0, although some still pop up. They are working on 8.1 and 8.2.
We need to backport their fixes, making sure to get them all.
Here is a list of existing PRs with the PHP 8 label. Each needs review and testing.

1 Like

Thanks Joy, the good part of the story is that it can actually be achieved in chunks. It may be a long list but… step by step.

Do you know if there is a list of all the PHP 8 changes that have happened in WP, to go over it and add more backport PRs?

The WP core Trac has php8 as a keyword.

Programmers should read about it at PHP.net but also at WP’s post.

1 Like