[wp-trac] [WordPress Trac] #53858: PHP 8.1: syntax error due to new 'readonly' property
WordPress Trac
noreply at wordpress.org
Tue Sep 14 22:07:00 UTC 2021
#53858: PHP 8.1: syntax error due to new 'readonly' property
-------------------------------------------------+-------------------------
Reporter: haosun | Owner: jrf
Type: defect (bug) | Status: reopened
Priority: normal | Milestone: 5.8.2
Component: General | Version:
Severity: normal | Resolution:
Keywords: php81 needs-dev-note has-patch | Focuses:
early has-unit-tests commit fixed-major |
-------------------------------------------------+-------------------------
Comment (by jrf):
As the PR to PHP Core has now been committed to PHP 8.1, which mitigates
the breaking impact of the new keyword for the WP usecase, the backport is
no longer needed.
The change to PHP Core is expected to be a temporary exception to the
keyword rules (probably until PHP 9.0, but the discussion about this has
only just started), so the original patch for WP 5.9 is still needed and
devs should still migrate to using the new function name.
And even if the exception made in PHP would not be temporary, I still
think this change should stay in WP as using a PHP reserved keyword as a
function name is not only confusing, but also sets a bad example and
precedent.
Having said all that, @desrosj @SergeyBiryukov can this ticket now be
closed ? Or should it stay open for the dev-note (which is still needed) ?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/53858#comment:44>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list