php-enqueue / enqueue-dev

Message Queue, Job Queue, Broadcasting, WebSockets packages for PHP, Symfony, Laravel, Magento. DEVELOPMENT REPOSITORY - provided by Forma-Pro
https://enqueue.forma-pro.com/
MIT License
2.17k stars 429 forks source link

Use `#[AsCommand]` attribute on commands #1311

Closed ruudk closed 10 months ago

ruudk commented 1 year ago

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
  },
ruudk commented 1 year ago

@makasim Could you please approve the workflows? Would be great if this was enabled by default. 🙏

ruudk commented 1 year ago

Rebased because #1295 #1303 were merged

ruudk commented 1 year ago

@makasim please approve the workflow again.

ruudk commented 1 year ago

@makasim Pushed a change for the Docker image. Please approve again.

ruudk commented 1 year ago

Errors are unrelated to my changes. I give up.

ruudk commented 11 months ago

@makasim what's need to be done to get this merged? The errors are not related to my PR.

makasim commented 11 months ago

CI should pass

VincentLanglet commented 10 months ago

i fixed the Ci from your PR in https://github.com/php-enqueue/enqueue-dev/pull/1317 @ruudk @makasim

ruudk commented 10 months ago

Applied the fix to this PR., please approve it so we can get this merged.

VincentLanglet commented 10 months ago

Thanks @makasim, A new tag/release would be awesome :)

ruudk commented 10 months ago

@VincentLanglet A tag wouldn't help much, as there are still deprecations that need fixing: https://github.com/php-enqueue/enqueue-dev/pull/1312

If you have an idea how to solve it, would be great 🙏

VincentLanglet commented 10 months ago

@VincentLanglet A tag wouldn't help much, as there are still deprecations that need fixing: #1312

A tag would still be usefull because it solve already a lot of deprecation. I personally use only some part on this lib, and never got the deprecation from #1312.

If you have an idea how to solve it, would be great 🙏

Did you try to rebase the branch ? And then I think you'll only get the linter error.