Skip to content
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

Add an option to warn about undeclared global functions regardless of Psalm's signature map. #1025

Open
TysonAndre opened this issue Oct 16, 2018 · 3 comments
Labels
easy problems Issues that can be fixed without background knowledge of Psalm enhancement

Comments

@TysonAndre
Copy link
Contributor

Currently, Psalm will not warn about undeclared global functions if they exist in src/Psalm/CallMap.php.

This cuts down on false positives but introduces some false negatives.

  • Psalm allows users to provide stub files already - This can be used for extensions that wouldn't be loaded during analysis, such as apache, xdebug, etc.

I'm thinking of something along the line of this config setting

@muglug
Copy link
Collaborator

muglug commented Oct 16, 2018

Thanks for flagging. I occasionally remember Psalm doesn't warn about this.

@muglug muglug added the easy problems Issues that can be fixed without background knowledge of Psalm label Apr 26, 2020
@AndrolGenhald
Copy link
Collaborator

@TysonAndre Would you consider this fixed by the new extension loading system in #7107? Extension defined functions are still in the CallMap right now, but they'll be removed in #7641.

@flaviovs
Copy link

flaviovs commented Mar 14, 2024

Got bit by this today: app used legacy GeoIP function which, as far as I know, are deprecated, and no easy way to get an extension for latest Debian stable is provided.

No errors from Psalm, luckily our CI caught the issue before the app going live.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
easy problems Issues that can be fixed without background knowledge of Psalm enhancement
Projects
None yet
Development

No branches or pull requests

4 participants