[12.x] Remove call to deprecated getDefaultDescription
method
#55990
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.
The
getDefaultDescription
method on the (Symfony)Command
class has been deprecated as of v7.3, see symfony/symfony#59565. This call was introduced in #45117, apparently to serve as a fallback for when no description is set in the LaravelCommand
child class implementation.However, given that in the
Symfony
class this call is already part of the constructor in 7.2 (see https://github.com/symfony/symfony/blob/ac794a799f5eda52a67e099d6a2752574b86833f/src/Symfony/Component/Console/Command/Command.php#L100), the call here looks useless to me. (edit: it has been around since 5.3 even; see https://github.com/symfony/symfony/blob/a57252fb11b4cd856476aa4e4dd359404d3537fb/src/Symfony/Component/Console/Command/Command.php#L120).To prevent this call from triggering deprecation messages (like the one forcefully suppressed in #55888), I therefore propose simply removing it altogether.
Use cases:
description
property valueAsCommand
attribute from Symfony to provide command metadata