[wp-trac] [WordPress Trac] #53858: PHP 8.1: syntax error due to new 'readonly' property
WordPress Trac
noreply at wordpress.org
Mon Sep 6 10:45:02 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):
FYI: some ''not all too subtle'' lobbying from my end, may be yielding
some results.
There is a PR open against PHP core now to reduce `readonly` from "full
keyword" to (limited) "contextual keyword", which would hopefully avoid
any white screens of death: https://github.com/php/php-src/pull/7468
I still think we need to strongly encourage plugins/themes to move to
using the `wp_readyonly()` function as having a function name which
clashes with a PHP reserved keyword is never a good idea, but the impact
on end-users for slow adopters amongst plugins/themes should be a whole
lot less if the upstream change gets accepted.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/53858#comment:42>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list