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
Cannot run psalm without a composer autoloader #935
Comments
Well, docs say psalm requires composer (and its autoloader). It doesn't need to be functional though, so you can work around this with |
If you encounter 'No lockfile found' error you can safely ignore it. |
Yeah, although I can see why you might not want that. It shouldn't need composer (e.g. when running from the phar or from another directory) and I'll try and get that working properly. |
I have this problem with Psalm 3.2.7:
Not even
However, As soon as an autoloader generated using Composer exists in
|
@sebastianbergmann what's |
|
The original fix did not apply to the Phar, but I've just patched it to hopefully work more robustly. |
I am seeing this problem (or a problem that looks like it) again with Psalm 5.1.0: without a Composer-generated autoloader present, Psalm refuses to start. |
@sebastianbergmann does this only happen for |
No, it is not limited to |
@sebastianbergmann is there any way for me to reproduce it? I tried, but everything seems to be working for me: |
No, sorry, this is in an internal project. If/When I am able to reproduce it in a minimal and self-contained way then I will open a new ticket. Sorry for the noise! |
No problem. At the very least it led to error message improvement in #8827 |
I have psalm installed globally and wanted to run it on a single file that has no includes and doesn't need or use an autoloader. I am attempting to create a minimum test case to reproduce an exception psalm is throwing on a larger project.
It refused to run with the message:
Could not find any composer autoloaders in <project_dir>
Add a --root=[your/project/directory] flag to specify a particular project to run Psalm on.
The text was updated successfully, but these errors were encountered: