Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[Console] Mark AsCommand attribute as @final #60103

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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 1, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions 1 UPGRADE-7.3.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
-------------------
Expand Down
2 changes: 2 additions & 0 deletions 2 src/Symfony/Component/Console/Attribute/AsCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@

/**
* Service tag to autoconfigure commands.
*
* @final since Symfony 7.3
*/
#[\Attribute(\Attribute::TARGET_CLASS)]
class AsCommand
Expand Down
1 change: 1 addition & 0 deletions 1 src/Symfony/Component/Console/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
---
Expand Down
Loading
Morty Proxy This is a proxified and sanitized view of the page, visit original site.