[wp-trac] [WordPress Trac] #54730: PHP 8.x: various compatibility fixes for WordPress 6.0
WordPress Trac
noreply at wordpress.org
Mon Jan 10 14:38:50 UTC 2022
#54730: PHP 8.x: various compatibility fixes for WordPress 6.0
-------------------------------------------------+-------------------------
Reporter: hellofromTonya | Owner: (none)
Type: task (blessed) | Status: new
Priority: normal | Milestone: 6.0
Component: General | Version:
Severity: normal | Resolution:
Keywords: php8 php81 has-patch has-unit-tests | Focuses: coding-
| standards
-------------------------------------------------+-------------------------
Comment (by hellofromTonya):
Dropping [51968] as a reminder of ongoing architectural decisions needed
to resolve remaining known deprecation notices
This changeset ignores (on purpose) "null to nullable" deprecations for
select tests. Why? Here are the details:
Adds an expectation for PHP 8.1 "passing null to non-nullable" deprecation
notice to select tests where the deprecation is generated by one of the
functions in the wp-`includes/formatting.php` file, either via a filter
hook callback or by a direct call.
Instead of haphazardly fixing these issues exposed by the tests, a more
structural and all-encompassing solution for input validation should be
architected and implemented as otherwise, we'll keep running into similar
issues time and again with each new PHP version.
To discourage people from "fixing" these issues now anyway, this commit
"hides" nearly all of these issues from the test runs.
Once a more structural solution is designed, these tests and the
underlying functions causing the deprecation notices should be revisited
and the structural solution put in place.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/54730#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list