Failed to create phpstan directory (mkdir(): Permission denied) on Windows 11
Bug report
PHPStan 2.1.38 works fine, but when I try to run PHPStan 2.1.39 I get the following error:
Child process error (exit code 1): PHP: syntax error, unexpected '~' in Unknown on line 7
Failed to create directory "C:\Users\THEODO/phpstan" (mkdir(): Permission denied).
while running parallel worker
My environment is Windows 11 25H2.
The error somewhat makes sense since I don't have a C:\Users\THEODO directory on my PC. My actual user folder is C:\Users\TheodoreBrown, also accessible via C:\Users\THEODO~1.
I tried clearing the cache with vendor/bin/phpstan clear-result-cache, and this outputs:
Result cache cleared from directory:
C:\Users\THEODO~1\AppData\Local\Temp/phpstan
But I still get the above error when trying to analyze a project with PHPStan.
Could this have been broken by phpstan/phpstan-src#4699?
Code snippet that reproduces the problem
Not applicable.
Expected output
No fatal error.
Did PHPStan help you today? Did it make you happy in any way?
PHPStan is awesome!