-
-
Notifications
You must be signed in to change notification settings - Fork 947
Support for generics in ReflectionAttribute #5511
Copy link
Copy link
Closed
phpstan/phpstan-src
#640Labels
Description
ReflectionAttribute should be generic, so that \ReflectionClass::getAttributes() and \ReflectionAttribute::newInstance() have information about the attribute type:
\ReflectionClass::getAttributes(string $name = null, int $flags = 0) will need a dynamic return type extension reflecting $name parameter. The second parameter changes method's behaviour but doesn't have affect on the return type.
Reactions are currently unavailable