To reproduce:
-
Do composer install for top-level /composer.json
-
Do composer install for include/composer.json
-
Run .\vendor\bin\phpstan.bat analyse --level 6 --configuration phpstan.neon --memory-limit 8G --debug wwwroot/test.php
-
In contrast, validating the wwwroot/test_working.php works fine for me in phpstan, despite it being very similar. So it probably isn't an issue with actually finding the class file, but more like missing a symbol somewhere?
PHP version used: php 7.4.27 Windows non-thread-safe x64 build.