[wp-trac] [WordPress Trac] #56009: Prepare for PHP 8.2
WordPress Trac
noreply at wordpress.org
Mon Jun 20 10:15:49 UTC 2022
#56009: Prepare for PHP 8.2
----------------------------+---------------------
Reporter: jrf | Owner: (none)
Type: task (blessed) | Status: new
Priority: normal | Milestone: 6.1
Component: General | Version:
Severity: normal | Resolution:
Keywords: php82 | Focuses:
----------------------------+---------------------
Comment (by jrf):
Replying to [comment:2 johnbillion]:
> Let's also add PHPCS/WPCS and PHPCompatibility/PHPCompatibilityWP to the
"Readiness of essential tooling" list.
@johnbillion Could you eleborate on that ?
In my opinion, PHPCS/WPCS are actually not relevant as WP won't start
using any of the new PHP syntaxes until the minimum PHP version goes up
to, so any problems PHPCS may have with those won't impact WordPress' PHP
8.2 readiness.
And sniffs are all set up to give the same results independently of the
PHP version on which PHPCS is run, so again, that is not a problem.
The same applies for PHPCompatibility, though obviously there is an extra
aspect to that: has PHPCompatibility put sniffs in place to detect
incompatibilities ?
Work is ongoing for that behind the scenes, but that's a whole other (and
very long) story. But for all practical purposes, it also isn't a problem
as even for those sniffs not yet published, let alone released, the scan
can still be executed (and is semi-regularly) due to the short line
between WP and the maintainers of PHPCompatibility (aka: me) and tickets
are opened for newly detected incompatibilities found (like some of the
above listed tickets).
Also note that while PHPCompatibility can catch _a lot_ of issues, the
most problematic changes in PHP cannot be detected by PHPCompatibility as
they depend on access to the runtime value of variables or cross-file
scanning, which PHPCompatibility does not have.
Think: the PHP 8.1 "passing null to non-nullable" deprecation or the PHP
8.2 dynamic properties change (which can be partially detected, but
detection is limited to the file being scanned).
--
Ticket URL: <https://core.trac.wordpress.org/ticket/56009#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list