-
-
Notifications
You must be signed in to change notification settings - Fork 934
Closed
phpstan/phpstan-src
#640Labels
Description
ReflectionAttribute should be generic, so that \ReflectionClass::getAttributes() and \ReflectionAttribute::newInstance() have information about the attribute type:
https://phpstan.org/r/83d2e1b0-6e61-42b2-bfc3-17f329c223ee
\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.