[wp-trac] [WordPress Trac] #56034: PHP 8.2: proposal for handling unknown dynamic properties deprecations
WordPress Trac
noreply at wordpress.org
Thu Jul 14 16:29:57 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 markjaquith):
I support this proposal wholeheartedly.
This seems like the best approach to give plugin authors and site
operators maximum warning about the impending full deprecation of dynamic
properties.
> The sniff will not be able to determine whether something is a new
class, so it will not be able to enforce that new classes introduced to WP
Core implement use of the `ForbidDynamicProperties` trait, only that one
of the two traits or the full set of magic methods, is implemented.
@jrf Could a sniff leverage PHPDoc `@since` information to identify
classes that are newly-added to WordPress core but have erroneously been
given `#[AllowDynamicProperties]` or the `DeprecateDynamicProperties`
trait?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/56034#comment:13>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list