phar
phar copied to clipboard
Call to undefined method `Psalm\Config::getConfigForPath()` Psalm 5.23.0
Uncaught Error: Call to undefined method Psalm\Config::getConfigForPath() in phar:///Users/nathane/.phive/phars/psalm-5.23.0.phar/src/Psalm/Internal/CliUtils.php:265
Stack trace:
#0 phar:///Users/nathane/.phive/phars/psalm-5.23.0.phar/src/Psalm/Internal/Cli/Psalm.php(383): Psalm\Internal\CliUtils::initializeConfig(NULL, '/Users/nathane/...', 'console', Object(Composer\Autoload\ClassLoader), false)
#1 phar:///Users/nathane/.phive/phars/psalm-5.23.0.phar/src/Psalm/Internal/Cli/Psalm.php(670): Psalm\Internal\Cli\Psalm::loadConfig(NULL, '/Users/nathane/...', 'console', Object(Composer\Autoload\ClassLoader), false, Array)
#2 phar:///Users/nathane/.phive/phars/psalm-5.23.0.phar/src/Psalm/Internal/Cli/Psalm.php(204): Psalm\Internal\Cli\Psalm::initConfig('/Users/nathane/...', Array, 'vendor', Object(Composer\Autoload\ClassLoader), NULL, 'console', false, Array)
#3 phar:///Users/nathane/.phive/phars/psalm-5.23.0.phar/psalm(7): Psalm\Internal\Cli\Psalm::run(Array)
#4 /Users/nathane/.phive/phars/psalm-5.23.0.phar(14): require('phar:///Users/n...')
#5 {main}
(Psalm 5.23.0@005e3184fb6de4350a873b9b8c4dc3cede9db762 crashed due to an uncaught Throwable)
installed via phive
I cannot reproduce it:
Would you mind creating a small repro in a separate repo?
Thanks for looking into this @weirdan,
It turned out to be a combination of things.
- In the 1st package
ghostwriter/coding-standard
,
-
I was using
"vimeo/psalm": ">=5.23 || <6.0.1 || dev-main as 6.0.0.999”
in composer (to be able to usenikic/PHP-Parser
both4.x
and5.x
in other packages) -
I made a mistake using
|| <6.0.1
.
- In the 2nd package
ghostwriter/psalm-sandbox
,
-
I used
ghostwriter/coding-standard
andnikic/[email protected]
as a dev dependency. -
composer was downloading
vimeo/psalm:0.3.14
because of|| <6.0.1
.
Now, i don't understand is how or why downloading and executing a psalm-5.23.0.phar
phar file
some how touched the vendor directory outside of the phar and complain something was missing in the phar:///
I’ll find time to reproduce it, but removing || <6.0.1
fixed my issue.
Sorry for the delay, https://github.com/ghostwriter/psalm-phar-issues-17