Replies: 3 comments 1 reply
-
I agree with you that this would be an improvement, but why can't we have both? As phpdoc is still used everywhere else in the framework, I wouldn't just remove it. A lot of developers rely on tools that us phpdoc as their primary source of information and I see no harm in having it in place, especially in stubs. |
Beta Was this translation helpful? Give feedback.
-
Hey there, We're closing this issue because it's inactive, already solved, old, or not relevant anymore. Feel free to open up a new issue if you're still experiencing this problem. |
Beta Was this translation helpful? Give feedback.
-
This was added to Laravel 10 via #44545 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
In my opinion, type declaration allows for cleaner code than the phpdoc
@param
and@return
notations. These were used back in the days when PHP didn't have type declaration. So I think now might be a good time to refactor the stubs used by the artisan commands and switch to php native type declarations.For example controller.stub (src\Illuminate\Routing\Console\stubs) would go from this:
To this:
What are you thoughts? If this is something that's desirable, I can create a PR for this.
Beta Was this translation helpful? Give feedback.
All reactions