%rootDir% users phar:// prefix
hrach opened this issue · 7 comments
In 0.9 version I used this config:
parameters:
autoload_directories:
- %rootDir%/../../../../appNow in 0.10 it's not possible since the path is prefixed with the phar:// protocol prefix. phar://D:\storage\webs\signaly.cz\app'
Fortunately, relative paths works ok. Not sure how this is recommended way to use (to use the %rootDir%).
cc @lookyman can you investigate? might have been broken by the new compiler. Thanks!
Sure, I'll have a look as soon as I can.
Hmm, interesting. This does not appear to be caused by the new compiler after all.
0.9.2 phar://C:\server\www\phpstan\test\vendor\phpstan\phpstan-shim\phpstan.phar/../../../../app
0.10.1 phar://C:\server\www\phpstan\test\vendor\phpstan\phpstan-shim\phpstan/../../../../app
As you can see, both paths are prefixed with phar://, but since 0.10, the phpstan file is not a script linking to phpstan.phar, but rather just a copy of it. Could this somehow be the thing causing your problems, @hrach?
😱 Sorry, I obviously wrongly understand the cause. The issue was the the file couldn't be loaded from my neon. I may try later where exactly the problem is, but maybe we can close this, since relative paths works ok... not sure if this is important to fix.
You can now also use %currentWorkingDirectory% instead of %rootDir%, if you don't want to use relative paths for some reason. Should even provide for shorter paths with less ... 😊
This should no longer be the case - phpstan-shim should be usable 1:1 with phpstan. phpstan/phpstan@f17a5a5