[wp-trac] [WordPress Trac] #56034: PHP 8.2: proposal for handling unknown dynamic properties deprecations

WordPress Trac noreply at wordpress.org
Wed Aug 17 05:03:12 UTC 2022


#56034: PHP 8.2: proposal for handling unknown dynamic properties deprecations
-------------------------------+-----------------------------
 Reporter:  jrf                |       Owner:  hellofromTonya
     Type:  task (blessed)     |      Status:  accepted
 Priority:  normal             |   Milestone:  6.2
Component:  General            |     Version:
 Severity:  normal             |  Resolution:
 Keywords:  php82 needs-patch  |     Focuses:
-------------------------------+-----------------------------

Comment (by jrf):

 Replying to [comment:24 peterwilsoncc]:
 > Replying to [comment:21 jrf]:
 > Do you have a preference? I'm happy to defer to you, @markjaquith and
 @hellofromTonya on this.

 Personally I think it will reduce the noise, both in the test runs as well
 as from people opening issues about the deprecation notices, so I'm in
 favour of adding the attributes (for the time being).

 >
 > Core already uses `#[ReturnTypeWillChange]` to reduce notices so it's
 not a new pattern.

 Well, there is one significant difference with the
 `#[ReturnTypeWillChange]` attribute:

 For the methods to which we added `#[ReturnTypeWillChange]`, we really
 **''can't''** fix this until the minimum PHP version has gone up.
 Depending on the method, the minimum PHP version needed is different, for
 some PHP 7.0 will suffice, for others PHP 8.0 is needed.

 For the dynamic properties deprecation, we ''can'' fix the code for the
 most part, but we will need more time to do so and using the attribute
 "buys" us that time.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/56034#comment:25>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list