psalm icon indicating copy to clipboard operation
psalm copied to clipboard

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

Open TysonAndre opened this issue 7 years ago • 3 comments

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

TysonAndre avatar Oct 16 '18 15:10 TysonAndre

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

muglug avatar Oct 16 '18 18:10 muglug

@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.

AndrolGenhald avatar Feb 18 '22 17:02 AndrolGenhald

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.

flaviovs avatar Mar 14 '24 04:03 flaviovs