Le lun. 21 juil. 2025 à 20:23, Daniel Scherzer <daniel.e.scher...@gmail.com> a écrit :
> On Thu, Jul 17, 2025 at 9:21 AM Daniel Scherzer < > daniel.e.scher...@gmail.com> wrote: > >> Hi internals, >> >> Voting is now open for this RFC. >> >> * RFC: https://wiki.php.net/rfc/delayedtargetvalidation_attribute >> * Discussion thread: https://externals.io/message/127702 >> >> Voting will end 2025-07-31 at end-of-day UTC. >> >> -Daniel >> > > For those who are still debating how to vote, or who voted no, I want to > highlight the "Extend #[\Override] to target properties" RFC currently in > voting as an example of a use case. See > https://wiki.php.net/rfc/override_properties. > > Specifically, if we had already added #[\DelayedTargetValidation] as part > of 8.4, and that other RFC passes, there would have been a place to use it > - on class properties in code that supports 8.4 and 8.5 but wants to > indicate that the property overrides a parent property. Fundamentally, > #[\DelayedTargetValidation] needs to be introduced *before* it is useful, > because it is designed for supporting attributes that change in future > versions of PHP. Introducing it in 8.5 might not help for #[\Override] on > property, but it would help for any attribute changes in 8.6+, e.g. if > #[\Override] starts to support class constants. > I voted in favor of the RFC precisely because of this capability, which is very much needed in code bases I deal with. Not having this will force us, authors, to create workarounds based on eg @annotations. Worst is that these workarounds will have to remain for a never ending amount of time as new attributes are introduced to the engine. Nicolas >