From fe9f285ab10fabda1b976472db89530d244090da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Xavier=20Segu=C3=AD=20Beltr=C3=A1n?= Date: Fri, 4 Apr 2025 12:13:14 +0200 Subject: [PATCH 1/5] Rollback configure method --- src/Command/SetupBrokerCommand.php | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/Command/SetupBrokerCommand.php b/src/Command/SetupBrokerCommand.php index 6b03dd1..d8ae8f2 100644 --- a/src/Command/SetupBrokerCommand.php +++ b/src/Command/SetupBrokerCommand.php @@ -10,11 +10,4 @@ public function __construct(SimpleClient $client) { parent::__construct($client->getDriver()); } - - protected function configure() - { - parent::configure(); - - $this->setName('enqueue:setup-broker'); - } } From 145503efee53758b0a77ce74e745098499382c5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Xavier=20Segu=C3=AD=20Beltr=C3=A1n?= Date: Fri, 4 Apr 2025 12:17:50 +0200 Subject: [PATCH 2/5] Configure SetupBrokerCommand with AsCommand Attribute from Symfony --- src/Command/SetupBrokerCommand.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Command/SetupBrokerCommand.php b/src/Command/SetupBrokerCommand.php index d8ae8f2..9b4f4e4 100644 --- a/src/Command/SetupBrokerCommand.php +++ b/src/Command/SetupBrokerCommand.php @@ -3,7 +3,9 @@ use Enqueue\SimpleClient\SimpleClient; use Enqueue\Symfony\Client\SimpleSetupBrokerCommand; +use Symfony\Component\Console\Attribute\AsCommand; +#[AsCommand('enqueue:setup-broker')] class SetupBrokerCommand extends SimpleSetupBrokerCommand { public function __construct(SimpleClient $client) From b963bc845a1568bd84d7724e0792995bb5e76b55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Xavier=20Segu=C3=AD=20Beltr=C3=A1n?= Date: Fri, 4 Apr 2025 12:19:28 +0200 Subject: [PATCH 3/5] Add named parameter name --- src/Command/SetupBrokerCommand.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Command/SetupBrokerCommand.php b/src/Command/SetupBrokerCommand.php index 9b4f4e4..8718b32 100644 --- a/src/Command/SetupBrokerCommand.php +++ b/src/Command/SetupBrokerCommand.php @@ -5,7 +5,7 @@ use Enqueue\Symfony\Client\SimpleSetupBrokerCommand; use Symfony\Component\Console\Attribute\AsCommand; -#[AsCommand('enqueue:setup-broker')] +#[AsCommand(name: 'enqueue:setup-broker')] class SetupBrokerCommand extends SimpleSetupBrokerCommand { public function __construct(SimpleClient $client) From 9284fdca550f482b7867e18edb10fe22ac07a442 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Xavier=20Segu=C3=AD=20Beltr=C3=A1n?= Date: Fri, 4 Apr 2025 12:21:55 +0200 Subject: [PATCH 4/5] Add named parameter name to ProduceCommand --- src/Command/ProduceCommand.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Command/ProduceCommand.php b/src/Command/ProduceCommand.php index f7449b8..f78576c 100644 --- a/src/Command/ProduceCommand.php +++ b/src/Command/ProduceCommand.php @@ -3,7 +3,9 @@ use Enqueue\SimpleClient\SimpleClient; use Enqueue\Symfony\Client\SimpleProduceCommand; +use Symfony\Component\Console\Attribute\AsCommand; +#[AsCommand(name: 'enqueue:produce')] class ProduceCommand extends SimpleProduceCommand { public function __construct(SimpleClient $client) From edd0653cdf4b0e6a7da438d8e30815ef9f1623a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Xavier=20Segu=C3=AD=20Beltr=C3=A1n?= Date: Fri, 4 Apr 2025 12:23:26 +0200 Subject: [PATCH 5/5] Add named parameter name to ConsumeCommand and RoutesCommand --- src/Command/ConsumeCommand.php | 2 ++ src/Command/RoutesCommand.php | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/Command/ConsumeCommand.php b/src/Command/ConsumeCommand.php index 5fe2425..673f94a 100644 --- a/src/Command/ConsumeCommand.php +++ b/src/Command/ConsumeCommand.php @@ -3,7 +3,9 @@ use Enqueue\SimpleClient\SimpleClient; use Enqueue\Symfony\Client\SimpleConsumeCommand; +use Symfony\Component\Console\Attribute\AsCommand; +#[AsCommand(name: 'enqueue:consume')] class ConsumeCommand extends SimpleConsumeCommand { public function __construct(SimpleClient $client) diff --git a/src/Command/RoutesCommand.php b/src/Command/RoutesCommand.php index 675d9d5..ea17501 100644 --- a/src/Command/RoutesCommand.php +++ b/src/Command/RoutesCommand.php @@ -3,7 +3,9 @@ use Enqueue\SimpleClient\SimpleClient; use Enqueue\Symfony\Client\SimpleRoutesCommand; +use Symfony\Component\Console\Attribute\AsCommand; +#[AsCommand(name: 'enqueue:routes')] class RoutesCommand extends SimpleRoutesCommand { public function __construct(SimpleClient $client)