Add an option to warn about undeclared global functions regardless of Psalm's signature map.
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
Thanks for flagging. I occasionally remember Psalm doesn't warn about this.
@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.
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.