Skip to content
This repository has been archived by the owner on Sep 24, 2020. It is now read-only.

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

Open
kilgaloon opened this issue Jan 31, 2017 · 6 comments
Open

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

kilgaloon opened this issue Jan 31, 2017 · 6 comments
Labels

Comments

@kilgaloon
Copy link
Contributor

kilgaloon commented Jan 31, 2017

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

@kilgaloon kilgaloon changed the title [Bug [Bug] [Language-error] Methods missing Jan 31, 2017
@kilgaloon kilgaloon changed the title [Bug] [Language-error] Methods missing [Bug] [Language-error] Function does not exist Jan 31, 2017
@ovr
Copy link
Owner

ovr commented Feb 1, 2017

Hey! Can you submit related code for tests?
Thanks

@algo13
Copy link
Contributor

algo13 commented Feb 5, 2017

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

  • abort
  • app
  • base_path
  • decrypt
  • dispatch
  • config
  • database_path
  • encrypt
  • env
  • event
  • factory
  • info
  • redirect
  • resource_path
  • response
  • route
  • storage_path
  • trans
  • url
  • view

@kilgaloon
Copy link
Contributor Author

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

@kilgaloon
Copy link
Contributor Author

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
Copy link
Owner

ovr commented Nov 21, 2017

@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 63d2b1f

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

@ddmler ddmler added the bug label Dec 7, 2017
@armoour
Copy link

armoour commented Jul 9, 2018

Same problem for Thinkphp applications;

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

5 participants