-
Notifications
You must be signed in to change notification settings - Fork 668
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 should load extensions based on composer.json instead of local configuration #5482
Comments
That's a comprehensible take by Matt, but I'm not sure I follow because I'm pretty sure Callmap will be loaded no matter what. So why loading simple functionlike definitions but not stubs? (for example: https://psalm.dev/r/097c2a2bf5) If we wanted to go this far, we would need to identify what part of the callmap belong to which extension to be able to enable/disable them. That seem far fetched. Honestly, I think we should enable all extensions from the start, loading only stubs conditionally is weird |
I found these snippets: https://psalm.dev/r/097c2a2bf5<?php
new Soapclient();
|
Note to self: the decimal extension can be removed from CI if/when this is implemented (#7103). When running tests all extensions should be enabled. |
…ons-based-on-composer-config Enable extensions based on composer.json instead of those loaded at runtime (fixes #5482).
This can be closed now |
I was thinking about this recently although it hasn't directly affected me yet, but I saw it pop up for someone else so I thought I'd create an issue.
Originally posted by @muglug in #5477 (comment)
With docker it's possible and probably even common for the local php configuration to be different from what's being used to run the code. If I have the PDO extension enabled locally, but composer doesn't require "ext-pdo" then psalm shouldn't load the PDO extension in case my local docker (or production!) environment doesn't use that extension.
It might also be a good idea to add a configuration option to enable or disable specific extensions in psalm.xml.
The text was updated successfully, but these errors were encountered: