ovr / phpsa

Smart/Static Analyzer(sis) for PHP :bowtie::neckbeard:
Other
638 stars 77 forks source link

[Bug] [Language-error] Function does not exist #323

Open kilgaloon opened 7 years ago

kilgaloon commented 7 years ago

I noticed that analyzer reports [language-error] when objects are invoked with error that function does not exists. This errors can be noticed at large numbers in Laravel/Lumen.

Sorry for edits, i pressed enter mid typing

ovr commented 7 years ago

Hey! Can you submit related code for tests? Thanks

algo13 commented 7 years ago

@Kilgaloon Autoload of lumen-framework/composer.json contains src/helpers.php. Is it an error indication of a function in this file?

kilgaloon commented 6 years ago

Yes, those helpers aren't registered by phpsa and they are reported as function does not exists.

kilgaloon commented 6 years ago

This is very irritating problem with any project that have this kind of global functions. Basically for lumen or laravel applications you get tons of notices. @ovr @ddmler Any thoughts about this?

ovr commented 6 years ago

@Kilgaloon There is a precompile step inside PHPSA, all functions inside director are visible to any scope, I think it's an NS issue related latest changes like https://github.com/ovr/phpsa/commit/63d2b1f5013cd779d70507ee0acbc53d8b46470f

Or it's a problem related that, function is inside if expression

armoour commented 6 years ago

Same problem for Thinkphp applications;