-
Notifications
You must be signed in to change notification settings - Fork 11k
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 command alias registration and usage. #50617
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Thanks for submitting a PR! Note that draft PR's are not reviewed. If you would like a review, please mark your pull request as ready for review in the GitHub user interface. Pull requests that are abandoned in draft may be closed due to inactivity. |
timacdonald
force-pushed
the
command-loading
branch
from
March 18, 2024 06:39
0a7aafb
to
015c017
Compare
timacdonald
changed the title
[11.x] Command loading
[11.x] Fix command alias registration and usage.
Mar 18, 2024
timacdonald
force-pushed
the
command-loading
branch
from
March 18, 2024 06:45
e64ccb3
to
5c17919
Compare
timacdonald
force-pushed
the
command-loading
branch
from
March 18, 2024 23:33
5c17919
to
36340f9
Compare
timacdonald
force-pushed
the
command-loading
branch
from
March 18, 2024 23:41
8a550e7
to
eb3ba27
Compare
This was referenced Mar 18, 2024
This was referenced Mar 19, 2024
driesvints
approved these changes
Mar 19, 2024
3 tasks
4 tasks
derekmd
added a commit
to derekmd/laravel-dusk-firefox
that referenced
this pull request
Oct 20, 2024
laravel/framework#50617 No need to instantiate all 3 of these commands when running another command.
derekmd
added a commit
to derekmd/laravel-dusk-firefox
that referenced
this pull request
Oct 20, 2024
laravel/framework#50617 No need to instantiate all 3 of these commands when running another command.
derekmd
added a commit
to derekmd/laravel-dusk-firefox
that referenced
this pull request
Oct 20, 2024
laravel/framework#50617 No need to instantiate all 3 of these commands when running another command.
derekmd
added a commit
to derekmd/laravel-dusk-firefox
that referenced
this pull request
Oct 20, 2024
laravel/framework#50617 No need to instantiate all 3 of these commands when running another command.
derekmd
added a commit
to derekmd/laravel-dusk-firefox
that referenced
this pull request
Oct 20, 2024
laravel/framework#50617 No need to instantiate all 3 of these commands when running another command.
derekmd
added a commit
to derekmd/laravel-dusk-firefox
that referenced
this pull request
Oct 20, 2024
laravel/framework#50617 No need to instantiate all 3 of these commands when running another command.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Our commands are not currently able to be run via their aliases defined in the class property. This is due to the
AsCommand
attribute.Attribute with: name
Attribute with: name, aliases
What does the
AsCommand
attribute do for Laravel?Applying the attribute allows us to not instantiate a command when running a different command.
For example, if we have the following command with no attribute:
and we proceed to run
php artisan view:clear
theSessionTableCommand
will be instantiated even though it is not needed.Commands are always instantiated when calling
php artisan list
Ecosystem PRs
I believe I've updated the most important open source commands to make them lazy and align across the ecosystem. I've also ensured that aliases are defined where needed.
Cannot update
tinker
orvapor-core
due to them supporting older version ofsymfony/console