[wp-trac] [WordPress Trac] #53858: PHP 8.1: syntax error due to new 'readonly' property

WordPress Trac noreply at wordpress.org
Tue Aug 3 16:27:19 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:
 Severity:  normal                          |  Resolution:
 Keywords:  php81 needs-dev-note has-patch  |     Focuses:

Comment (by jrf):

 Couple more thoughts I've had about this issue and the patch:
 1. I think a call to
 `_deprecated_function()`] needs to be added to the now deprecated
 `readonly()` function.
 2. The `@deprecated 5.9.0` tag in the docblock should mention the new
 function name as a replacement.
 3. I would like to advocate for this patch to be backported to (at least)
 a few older WP versions so that themes/plugins which support the latest 3
 to 5 WP versions don't have to polyfill the function.

Ticket URL: <https://core.trac.wordpress.org/ticket/53858#comment:22>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform

More information about the wp-trac mailing list