--level used: 3Files NunoMaduro\Larastan\Rules\NoUnnecessaryCollectionCallRule and NunoMaduro\Larastan\Types\RelationParserHelper are requiring PHPStan\Reflection\ReflectionProvider file, but it is missing in codebase.
Setting noUnnecessaryCollectionCall to false doesn't help either.
In Resolver.php line 404:
Service of type NunoMaduro\Larastan\Rules\NoUnnecessaryCollectionCallRule: Class PHPStan\Reflection\ReflectionProvider needed by $reflectionProvider in __construct() not found. Check type hint and 'use' statements.
Hello Krzysztof!
Thank you for your report
ReflectionProvider seems to be part of PHPStan 2 years ago
https://github.com/phpstan/phpstan-src/commits/master/src/Reflection/ReflectionProvider.php
Could you share a snippet of your code with us?
My bad, I realized that I have used phpstan installed globally on my computer, rather than by vendor/bin/phpstan. After this little change everything works like a charm. Sorry for trouble and thanks for fast response!
It doesn't/didn't happen often with larastan so far, but there are months were you've the feeling every 2nd bug report in phpunit is simply because the global installation is preferred but horribly outdated.
Would be interesting to know if there's a way to detect this.
Most helpful comment
My bad, I realized that I have used phpstan installed globally on my computer, rather than by
vendor/bin/phpstan. After this little change everything works like a charm. Sorry for trouble and thanks for fast response!