Repository navigation
Use #[AsCommand] attribute on commands - #1311
Conversation
|
@makasim Could you please approve the workflows? Would be great if this was enabled by default. 🙏 |
d0b4b2e to
884f508
Compare
|
@makasim please approve the workflow again. |
|
@makasim Pushed a change for the Docker image. Please approve again. |
|
Errors are unrelated to my changes. I give up. |
|
@makasim what's need to be done to get this merged? The errors are not related to my PR. |
|
CI should pass |
Fixes the following deprecations:
```json
{
"message": "Since symfony/console 6.1: Relying on the static property \"$defaultName\" for setting a command name is deprecated. Add the \"Symfony\\Component\\Console\\Attribute\\AsCommand\" attribute to the \"Enqueue\\Symfony\\Consumption\\ConfigurableConsumeCommand\" class instead.",
"count": 1
},
{
"message": "Since symfony/console 6.1: Relying on the static property \"$defaultName\" for setting a command name is deprecated. Add the \"Symfony\\Component\\Console\\Attribute\\AsCommand\" attribute to the \"Enqueue\\Symfony\\Client\\ConsumeCommand\" class instead.",
"count": 1
},
{
"message": "Since symfony/console 6.1: Relying on the static property \"$defaultName\" for setting a command name is deprecated. Add the \"Symfony\\Component\\Console\\Attribute\\AsCommand\" attribute to the \"Enqueue\\Symfony\\Client\\ProduceCommand\" class instead.",
"count": 1
},
{
"message": "Since symfony/console 6.1: Relying on the static property \"$defaultName\" for setting a command name is deprecated. Add the \"Symfony\\Component\\Console\\Attribute\\AsCommand\" attribute to the \"Enqueue\\Symfony\\Client\\SetupBrokerCommand\" class instead.",
"count": 1
},
{
"message": "Since symfony/console 6.1: Relying on the static property \"$defaultName\" for setting a command name is deprecated. Add the \"Symfony\\Component\\Console\\Attribute\\AsCommand\" attribute to the \"Enqueue\\Symfony\\Client\\RoutesCommand\" class instead.",
"count": 1
},
```
This way it understands attributes.
|
Applied the fix to this PR., please approve it so we can get this merged. |
|
Thanks @makasim, A new tag/release would be awesome :) |
|
@VincentLanglet A tag wouldn't help much, as there are still deprecations that need fixing: If you have an idea how to solve it, would be great 🙏 |
A tag would still be usefull because it solve already a lot of deprecation.
Did you try to rebase the branch ? And then I think you'll only get the linter error. |
Fixes the following deprecations:
{ "message": "Since symfony/console 6.1: Relying on the static property \"$defaultName\" for setting a command name is deprecated. Add the \"Symfony\\Component\\Console\\Attribute\\AsCommand\" attribute to the \"Enqueue\\Symfony\\Consumption\\ConfigurableConsumeCommand\" class instead.", "count": 1 }, { "message": "Since symfony/console 6.1: Relying on the static property \"$defaultName\" for setting a command name is deprecated. Add the \"Symfony\\Component\\Console\\Attribute\\AsCommand\" attribute to the \"Enqueue\\Symfony\\Client\\ConsumeCommand\" class instead.", "count": 1 }, { "message": "Since symfony/console 6.1: Relying on the static property \"$defaultName\" for setting a command name is deprecated. Add the \"Symfony\\Component\\Console\\Attribute\\AsCommand\" attribute to the \"Enqueue\\Symfony\\Client\\ProduceCommand\" class instead.", "count": 1 }, { "message": "Since symfony/console 6.1: Relying on the static property \"$defaultName\" for setting a command name is deprecated. Add the \"Symfony\\Component\\Console\\Attribute\\AsCommand\" attribute to the \"Enqueue\\Symfony\\Client\\SetupBrokerCommand\" class instead.", "count": 1 }, { "message": "Since symfony/console 6.1: Relying on the static property \"$defaultName\" for setting a command name is deprecated. Add the \"Symfony\\Component\\Console\\Attribute\\AsCommand\" attribute to the \"Enqueue\\Symfony\\Client\\RoutesCommand\" class instead.", "count": 1 },