feature #40234 [Console] Add `ConsoleCommand` attribute for declaring commands on PHP 8 (nicolas-grekas)
feature #40234 [Console] Add `ConsoleCommand` attribute for declaring commands on PHP 8 (nicolas-grekas)

This PR was merged into the 5.3-dev branch.

Discussion
----------

[Console] Add `ConsoleCommand` attribute for declaring commands on PHP 8

| Q             | A
| ------------- | ---
| Branch?       | 5.x
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| Tickets       | -
| License       | MIT
| Doc PR        | -

Builds on #39851

On PHP8, this PR will allow using an attribute instead of the public static properties for the name and the description.

```php

#[ConsoleCommand(
	name: 'app:my-command',
	description: '🌈',
	hidden: true,
	aliases: ['🌈'],
)]
class MyCommand extends Command
{
}
```

Commits
-------

0cbc9cc672 [Console] Add `ConsoleCommand` attribute for declaring commands on PHP 8

symfony/EventDispatcher,symfony/event-dispatcher