On Tue, Jun 17, 2025 at 4:26 PM Daniel Scherzer <daniel.e.scher...@gmail.com> wrote:
> Hi internals, > > I'd like to start the discussion for a new RFC about adding a > `#[\DelayedTargetValidation]` attribute. > > * RFC: https://wiki.php.net/rfc/delayedtargetvalidation_attribute > * Implementation: https://github.com/php/php-src/pull/18817 > > --Daniel > This discussion has been ongoing for more than 2 weeks, and from what I can see there have only been 2 concerns/suggestions raised: * Going in the opposite direction and validating userland attributes at compile time too - this is counter to the design of attributes, which are meant to be easy to apply and can even be used when the specified attribute does not exist, with errors only raised when attributes are parsed. * Avoid the need for the `#[\DelayedTargetValidation]` attribute by changing the default behavior - I (and others) have responded about why this would be problematic, and I have updated the RFC to include changing the default behavior as a rejected feature with an explanation of the issues. If there is no further feedback, I intend to start a vote in a few days. -Daniel