[wp-trac] [WordPress Trac] #56034: PHP 8.2: proposal for handling unknown dynamic properties deprecations
WordPress Trac
noreply at wordpress.org
Fri Jun 24 00:06:21 UTC 2022
#56034: PHP 8.2: proposal for handling unknown dynamic properties deprecations
-------------------------------------+---------------------
Reporter: jrf | Owner: (none)
Type: task (blessed) | Status: new
Priority: normal | Milestone: 6.1
Component: General | Version:
Severity: normal | Resolution:
Keywords: php82 early 2nd-opinion | Focuses:
-------------------------------------+---------------------
Comment (by peterwilsoncc):
I agree with introducing traits to WP, they were previously avoided due to
PHP version support but that is no longer an issue.
- is it possible for WPCS to be set up to require all classes use one of
the traits?
- in some cases I think it would be wise to continue to support dynamic
properties so `WpAllowDynamicProperties` would be helpful for forward
compatibility for situation four.
The specific circumstance I am thinking of for the latter situation is
`$wpdb`, some plugin set dynamic properties for table names
`$wpdb->56034_some_table_name` to allow them to use the DB Security sniffs
without false positives. (See
[https://wpdirectory.net/search/01G69FMWBMBKE91SX9PSNQQNC3 search results]
with a mix of true and false positives.)
I generally support this proposal but I think a decision of whether to
exclude `DeprecateDynamicProperties` from the backward compatibility
promise would need to involve project leadership.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/56034#comment:9>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list