Skip to content

Use #[AsCommand] attribute on commands - #1317

Closed
VincentLanglet wants to merge 4 commits into
php-enqueue:masterfrom
VincentLanglet:ascommand
Closed

VincentLanglet wants to merge 4 commits into
php-enqueue:masterfrom
VincentLanglet:ascommand

Conversation

@VincentLanglet

Copy link
Copy Markdown
Contributor

No description provided.

ruudk added 3 commits October 15, 2023 00:22
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.
@VincentLanglet
VincentLanglet marked this pull request as ready for review October 14, 2023 23:16
@ruudk

ruudk commented Oct 15, 2023

Copy link
Copy Markdown
Contributor

I applied your fix to my PR. Nice one, thanks!

@VincentLanglet
VincentLanglet deleted the ascommand branch October 16, 2023 07:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants