New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uncaught Error: Class "Composer\InstalledVersions" not found [phar] #7329
Comments
A new version of Box has been released 4 days ago: https://github.com/box-project/box/releases/tag/3.14.1 A way to avoid a surprise like that could be to commit the |
Not sure it's related. We merged this #7239 in last version. There must be something wrong here, possibly related to our scoper.inc.php file |
Hey All, can some of you try this phar and tell me if it fixes your issue? https://30363-74386167-gh.circle-artifacts.com/0/build/psalm.phar |
Note: One of phpdoc's repo is failing due to another error with the phar: |
There is still an error:
|
I'm not sure if this is expected that vendors are not considered installed in phars. The version is used to generate a hash for cache purposes. I'm afraid setting this to null would lead to cache corruption. But at the same time, I see that we caught the same exception on the Psalm version check. @DeyV was there a reason to try/catch the psalm version and not the php-parser one? |
I believe the linked issue in php-scoper causes this. The best course of action, I think, is to revert #7239 for now. |
I'm not sure this is the same issue. The "class not found" issue seems fixed. Now we just have an issue with the composer API that doesn't return versions when inside the phar |
I am positive it's the root cause. The fix for |
okay then, but it seems to me we already have this hack elsewhere. I literally just copy/pasted another piece of code EDIT: specifically this one: psalm/src/Psalm/Internal/Cli/Psalm.php Line 215 in 65fffd2
|
Version 4.18, PHP 8.1.1 or 8.0.x
Source code inside phar:
The text was updated successfully, but these errors were encountered: