phpstan: PHPStan does not finish on Windows with atk4/ui repo
Bug report
error output:
Note: Using configuration file C:\debug_stan\ui\phpstan.neon.dist.
Fatal error: During class fetch: Uncaught PHPStan\Broker\ClassAutoloadingException: Class Atk4\Core\ReadableCaptionTrait not found. in C:\debug_stan\ui\vendor\phpstan\phpstan-src\src\Reflection\Runtime\RuntimeReflectionProvider.php:186
Stack trace:
#0 [internal function]: PHPStan\Reflection\Runtime\RuntimeReflectionProvider->PHPStan\Reflection\Runtime\{closure}()
#1 C:\debug_stan\ui\vendor\atk4\data\src\Field.php(17): spl_autoload_call()
#2 C:\debug_stan\ui\vendor\phpstan\phpstan-src\vendor\composer\ClassLoader.php(444): include('C:\\Users\\mvoris...')
#3 C:\debug_stan\ui\vendor\phpstan\phpstan-src\vendor\composer\ClassLoader.php(322): Composer\Autoload\includeFile()
#4 [internal function]: Composer\Autoload\ClassLoader->loadClass()
#5 [internal function]: spl_autoload_call()
#6 C:\debug_stan\ui\vendor\phpstan\phpstan-src\src\Reflection\Runtime\RuntimeReflectionProvider.php(191): class_exists()
#7 C:\Users\mv in C:\debug_stan\ui\vendor\atk4\data\src\Field.php on line 17
probably related with https://github.com/phpstan/phpstan/issues/4283
Code snippet that reproduces the problem
steps to reproduce:
- be on Windows and PHP 7.4 NTS (not sure if 7.4/NTS is needed)
git clone git@github.com:atk4/ui.gitcd uicomposer install- run phpstan
reproducible with single process only (1 CPU)
Expected output
PHPStan finish
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 15 (13 by maintainers)
It’s something about your PHP version or distribution. I tried it with 7.4 and 8.0, both TS and NTS, and it works everywhere: https://github.com/phpstan/phpstan-src/runs/2585470261
I’m not going to pursue this investigation further.