-
Notifications
You must be signed in to change notification settings - Fork 11.1k
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
[11.x] Fix configure() return type #49648
Conversation
@@ -221,9 +222,8 @@ public function __construct($basePath = null) | |||
* Begin configuring a new Laravel application instance. | |||
* | |||
* @param string|null $baseDirectory | |||
* @return \Illuminate\Foundation\ApplicationBuilder |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This class does not exist, Configuration
was missing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add return type into doc
Thanks @TomasVotruba. Instead I just fixed the docblock itself: af5ba26 |
Thanks 👍 Just curious, why not change the type declaration? |
We don’t really add native return types to internal code. |
Why is that? |
Just because that’s how we’ve always been doing it |
I see. Would you be open to use native return types? |
Not right now sorry. We’re going to leave things be 👍 |
Hi everyone,
I've upgrade my personal and Rector website to Laravel 11 to try out new configuration API:
All is good!
One glitch is that the IDE autocomplete didn't work for me. I though there is some IDE cache, but in the end it was the return type issue.
This should fix it 👍
Using native return type seems a good idea, as we're using PHP 8.2 as min, and the incorrect return native type declaration would show this bug even in the PR adding this feature.
Let me know what you think and what should I improve 🙏