bmewburn / vscode-intelephense

PHP intellisense for Visual Studio Code
https://intelephense.com
Other
1.64k stars 94 forks source link

1.10.3 causes Laravel app() helper to always error as null #2829

Closed frankiejarrett closed 7 months ago

frankiejarrett commented 7 months ago

Describe the bug All cases of app() without an abstract is resolving as null in Intelephense causing code P1006. Rolling back to 1.10.2 and re-indexing resolves the issue.

To Reproduce

app()->environment('production'); // error
app()?->environment('production'); // workaround

app('url')->isValidUrl('some/path'); // seems to work as expected

Expected behavior Using app() without an abstract should always resolve to the container instance.

Screenshots

Screenshot 2024-03-26 at 9 38 25 AM Screenshot 2024-03-26 at 9 47 25 AM

Platform and version macOS 14.1.1 VS Code 1.88.0-insider Intelephense 1.10.4 Laravel 10.48.4

bmewburn commented 7 months ago

Closing duplicate