diff --git a/UPGRADE-7.3.md b/UPGRADE-7.3.md index 35a6a08eaf99c..5652ce639f19d 100644 --- a/UPGRADE-7.3.md +++ b/UPGRADE-7.3.md @@ -40,6 +40,7 @@ Console ``` * Deprecate methods `Command::getDefaultName()` and `Command::getDefaultDescription()` in favor of the `#[AsCommand]` attribute + * `#[AsCommand]` attribute is now marked as `@final`; you should use separate attributes to add more logic to commands DependencyInjection ------------------- diff --git a/src/Symfony/Component/Console/Attribute/AsCommand.php b/src/Symfony/Component/Console/Attribute/AsCommand.php index 2147e71510436..767d46ebb7ff1 100644 --- a/src/Symfony/Component/Console/Attribute/AsCommand.php +++ b/src/Symfony/Component/Console/Attribute/AsCommand.php @@ -13,6 +13,8 @@ /** * Service tag to autoconfigure commands. + * + * @final since Symfony 7.3 */ #[\Attribute(\Attribute::TARGET_CLASS)] class AsCommand diff --git a/src/Symfony/Component/Console/CHANGELOG.md b/src/Symfony/Component/Console/CHANGELOG.md index 6497def0f43bf..b84099a1d0e10 100644 --- a/src/Symfony/Component/Console/CHANGELOG.md +++ b/src/Symfony/Component/Console/CHANGELOG.md @@ -13,6 +13,7 @@ CHANGELOG * Add support for Markdown format in `Table` * Add support for `LockableTrait` in invokable commands * Deprecate returning a non-integer value from a `\Closure` function set via `Command::setCode()` + * Mark `#[AsCommand]` attribute as `@final` 7.2 ---