Bug report
Since 2.1.47 the following code will be resoved to list<ReflectionAttribute<object>> instead of list<ReflectionAttribute<I>>.
/**
* @param ReflectionClass<*>|ReflectionMethod $object
*/
protected function bug(ReflectionClass|ReflectionMethod $object): void {
$requirements = $object->getAttributes(I::class, ReflectionAttribute::IS_INSTANCEOF);
\PHPStan\dumpType($requirements);
}
Code snippet that reproduces the problem
https://phpstan.org/r/c5fe63b2-5c44-4f34-8eb3-7d4a633ca6b7
Expected output
list<ReflectionAttribute<I>>
Did PHPStan help you today? Did it make you happy in any way?
Yep.
Bug report
Since 2.1.47 the following code will be resoved to
list<ReflectionAttribute<object>>instead oflist<ReflectionAttribute<I>>.Code snippet that reproduces the problem
https://phpstan.org/r/c5fe63b2-5c44-4f34-8eb3-7d4a633ca6b7
Expected output
list<ReflectionAttribute<I>>Did PHPStan help you today? Did it make you happy in any way?
Yep.