Skip to content

[9.x] Improve command name handling#41595

Merged
taylorotwell merged 2 commits into9.xfrom
refactor-commands
Mar 21, 2022
Merged

[9.x] Improve command name handling#41595
taylorotwell merged 2 commits into9.xfrom
refactor-commands

Conversation

@driesvints
Copy link
Copy Markdown
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
@driesvints driesvints requested a review from taylorotwell 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