Skip to content
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

[9.x] Improve command name handling #41595

Merged
merged 2 commits into from
Mar 21, 2022
Merged

[9.x] Improve command name handling #41595

merged 2 commits into from
Mar 21, 2022

Conversation

driesvints
Copy link
Member

@driesvints driesvints commented Mar 21, 2022

This PR improves how the default name and description of a command are returned by giving precedence to the command signature and name property, just like in a command's constructor. This allows Symfony's lazy loading of a command to continue to function, without having to resolve the command from the container. Additionally, this PR allows you to make the new command attribute optional with Symfony 6.1

The most important changes in this PR are the overwriting of the getDefaultName and getDefaultDescription methods.

In Laravel v10, we may safely remove the deprecated static $defaultName property.

@driesvints driesvints marked this pull request as ready for review March 21, 2022 10:58
@taylorotwell taylorotwell merged commit 628d39f into 9.x Mar 21, 2022
@taylorotwell taylorotwell deleted the refactor-commands branch March 21, 2022 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants