[wp-trac] [WordPress Trac] #53858: PHP 8.1: syntax error due to new 'readonly' property
WordPress Trac
noreply at wordpress.org
Mon Aug 2 10:46:18 UTC 2021
#53858: PHP 8.1: syntax error due to new 'readonly' property
--------------------------+---------------------
Reporter: haosun | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 5.9
Component: General | Version: trunk
Severity: normal | Resolution:
Keywords: | Focuses:
--------------------------+---------------------
Changes (by ayeshrajans):
* keywords: php81 needs-patch =>
* version: 4.9 => trunk
Comment:
Thanks for opening this ticket, @haosun.
`readonly` indeed is a reserved token in PHP 8.1, so we have no choice but
to rename it.
I think simply renaming the function to `wp_readonly` (or something more
meaningful TBH) would do; this will be a breaking change no matter how we
like to see it. It will be a less severe one though, because thanks to
@swissspidy, we know there are at least no such calls in public
repositories exposed to wpdirectory.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/53858#comment:9>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list