On 4 May 2026 21:24:39 BST, Daniel Scherzer <[email protected]> wrote:
>Hi internals,
>
>I'd like to start the discussion for a new RFC about adding a new method,
>ReflectionAttribute::getCurrent(), to access the current reflection target
>of an attribute.
>
>* RFC: https://wiki.php.net/rfc/reflectionattribute-getcurrent


"a new static method, ReflectionAttribute::getCurrent(), that, when called from 
an attribute constructor, returns a reflection object corresponding to what the 
attribute was applied to."

This sounds like an arbitrary new rule for just this functionality. I don't 
think we should have special rules for a single static method call.

I believe it's useful to have something like this, but I'm not in favour of 
this approach.

Would it not be possible for this to be a normal (dynamic) method on the 
ReflectionAttrbute object?

cheers
Derick

Reply via email to