-
-
Notifications
You must be signed in to change notification settings - Fork 394
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrong return type when overwriting Request::user() #1718
Comments
I think Larastan does not know that |
Laravel (9) hints it as mixed via phpdoc. Larastan then deduces it down to ?User. But also overwrites children with a more narrow and native typehint which should not happen. |
Issue can be in this extension. We need to check if the |
I am facing the same issue Define the new request class overriding user method
Use the new request in the controller
Error
If I define new Any solution for this? |
--level
used: 8Description
Larastan will overwrite the return type of requests that narrow the return of
user()
.Laravel code where the issue was found
The text was updated successfully, but these errors were encountered: