-
Notifications
You must be signed in to change notification settings - Fork 667
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
Psalm analysis via Phar can break if custom autoloader is used in config #565
Comments
Possible solutions are to have Psalm scan that file and remove autoloaders that are already in use before |
I can't reproduce it, probably something is missing from your description. But I suppose it's the reversal of the #551 ? Now psalm loads it's classes from the project vendor dir? Alternatively, psalm could see that it's own copy is available in project vendors, and run that instead (supposedly developers have a reason to not update). Interestingly enough, PHPUnit seems to work mostly fine in the similar scenario (7.x installed globally, 6.x installed locally). I think that's the consequence of very stable code base. |
That would be incredibly ideal. Again, it would just need to ignore the stubs directory. |
I'll investigate that - thanks |
box-project/box#31 - this is where it was introduced. |
To reproduce:
autoload="myautoloader.php"
configured inpsalm.xml
which requiresvendor/autoload.php
composer require --dev vimeo/psalm:0.3
) for that projectphar
and--root=[project root]
where the Phar has a different version of PsalmThis is also seen when just running Psalm on a different project with
--root
(not using phar)cc @weirdan
The text was updated successfully, but these errors were encountered: