You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In laravel 11 the docblock return type of app() function has changed using generics. Now when called without arguments his return type is \Illuminate\Foundation\Application.
Before it was \Illuminate\Contracts\Foundation\Application|\Illuminate\Foundation\Application
With this change overrides in .phpstorm.meta.php are not working when calling app()->make(...).
Manually adding the Contract type to the return variable makes it work again:
The text was updated successfully, but these errors were encountered:
This change also breaks the return type of the app() helper when parameters are provided.
In vscode intelephense ignores metadata if templates are used: bmewburn/vscode-intelephense#3142
I'm not sure about PHPstom, but in vscode with intelephense extension meta overrides are not used if method has a phpdoc with templates used. So calling app() with a string parameter will always return mixed because overrides are not used in this case.
Versions:
Description:
In laravel 11 the docblock return type of app() function has changed using generics. Now when called without arguments his return type is \Illuminate\Foundation\Application.
Before it was \Illuminate\Contracts\Foundation\Application|\Illuminate\Foundation\Application
With this change overrides in .phpstorm.meta.php are not working when calling app()->make(...).
Manually adding the Contract type to the return variable makes it work again:
The text was updated successfully, but these errors were encountered: