vimeo / psalm

A static analysis tool for finding errors in PHP applications
https://psalm.dev
MIT License
5.54k stars 660 forks source link

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

Open TysonAndre opened 5 years ago

TysonAndre commented 5 years ago

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.

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

muglug commented 5 years ago

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

AndrolGenhald commented 2 years ago

@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 commented 6 months ago

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.