Skip to content

Commit 3be1369

Browse files
committed
fixed BC
1 parent 3f91a66 commit 3be1369

File tree

6 files changed

+23
-12
lines changed

6 files changed

+23
-12
lines changed

Diff for: pkg/enqueue/Symfony/Client/ConsumeCommand.php

+4-2
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,16 @@
2020
use Symfony\Component\Console\Input\InputOption;
2121
use Symfony\Component\Console\Output\OutputInterface;
2222

23-
#[AsCommand('enqueue:consume')]
23+
#[AsCommand(self::COMMAND_NAME)]
2424
class ConsumeCommand extends Command
2525
{
2626
use ChooseLoggerCommandTrait;
2727
use LimitsExtensionsCommandTrait;
2828
use QueueConsumerOptionsCommandTrait;
2929
use SetupBrokerExtensionCommandTrait;
3030

31+
private const COMMAND_NAME = 'enqueue:consume';
32+
3133
/**
3234
* @var ContainerInterface
3335
*/
@@ -66,7 +68,7 @@ public function __construct(
6668
$this->driverIdPattern = $driverIdPattern;
6769
$this->processorIdPattern = $processorIdPatter;
6870

69-
parent::__construct(self::$defaultName);
71+
parent::__construct(self::COMMAND_NAME);
7072
}
7173

7274
protected function configure(): void

Diff for: pkg/enqueue/Symfony/Client/ProduceCommand.php

+4-2
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,11 @@
1313
use Symfony\Component\Console\Input\InputOption;
1414
use Symfony\Component\Console\Output\OutputInterface;
1515

16-
#[AsCommand('enqueue:produce')]
16+
#[AsCommand(self::COMMAND_NAME)]
1717
class ProduceCommand extends Command
1818
{
19+
private const COMMAND_NAME = 'enqueue:produce';
20+
1921
/**
2022
* @var ContainerInterface
2123
*/
@@ -37,7 +39,7 @@ public function __construct(ContainerInterface $container, string $defaultClient
3739
$this->defaultClient = $defaultClient;
3840
$this->producerIdPattern = $producerIdPattern;
3941

40-
parent::__construct(static::$defaultName);
42+
parent::__construct(self::COMMAND_NAME);
4143
}
4244

4345
protected function configure(): void

Diff for: pkg/enqueue/Symfony/Client/RoutesCommand.php

+3-2
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,10 @@
1414
use Symfony\Component\Console\Input\InputOption;
1515
use Symfony\Component\Console\Output\OutputInterface;
1616

17-
#[AsCommand('enqueue:routes')]
17+
#[AsCommand(self::COMMAND_NAME)]
1818
class RoutesCommand extends Command
1919
{
20+
private const COMMAND_NAME = 'enqueue:routes';
2021
/**
2122
* @var ContainerInterface
2223
*/
@@ -43,7 +44,7 @@ public function __construct(ContainerInterface $container, string $defaultClient
4344
$this->defaultClient = $defaultClient;
4445
$this->driverIdPatter = $driverIdPatter;
4546

46-
parent::__construct(static::$defaultName);
47+
parent::__construct(self::COMMAND_NAME);
4748
}
4849

4950
protected function configure(): void

Diff for: pkg/enqueue/Symfony/Client/SetupBrokerCommand.php

+4-2
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,11 @@
1212
use Symfony\Component\Console\Logger\ConsoleLogger;
1313
use Symfony\Component\Console\Output\OutputInterface;
1414

15-
#[AsCommand('enqueue:setup-broker')]
15+
#[AsCommand(self::COMMAND_NAME)]
1616
class SetupBrokerCommand extends Command
1717
{
18+
private const COMMAND_NAME = 'enqueue:setup-broker';
19+
1820
/**
1921
* @var ContainerInterface
2022
*/
@@ -36,7 +38,7 @@ public function __construct(ContainerInterface $container, string $defaultClient
3638
$this->defaultClient = $defaultClient;
3739
$this->driverIdPattern = $driverIdPattern;
3840

39-
parent::__construct(static::$defaultName);
41+
parent::__construct(self::COMMAND_NAME);
4042
}
4143

4244
protected function configure(): void

Diff for: pkg/enqueue/Symfony/Consumption/ConfigurableConsumeCommand.php

+4-2
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,15 @@
1515
use Symfony\Component\Console\Input\InputOption;
1616
use Symfony\Component\Console\Output\OutputInterface;
1717

18-
#[AsCommand('enqueue:transport:consume')]
18+
#[AsCommand(self::COMMAND_NAME)]
1919
class ConfigurableConsumeCommand extends Command
2020
{
2121
use ChooseLoggerCommandTrait;
2222
use LimitsExtensionsCommandTrait;
2323
use QueueConsumerOptionsCommandTrait;
2424

25+
private const COMMAND_NAME = 'enqueue:transport:consume';
26+
2527
/**
2628
* @var ContainerInterface
2729
*/
@@ -53,7 +55,7 @@ public function __construct(
5355
$this->queueConsumerIdPattern = $queueConsumerIdPattern;
5456
$this->processorRegistryIdPattern = $processorRegistryIdPattern;
5557

56-
parent::__construct(static::$defaultName);
58+
parent::__construct(self::COMMAND_NAME);
5759
}
5860

5961
protected function configure(): void

Diff for: pkg/enqueue/Symfony/Consumption/ConsumeCommand.php

+4-2
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,15 @@
1313
use Symfony\Component\Console\Input\InputOption;
1414
use Symfony\Component\Console\Output\OutputInterface;
1515

16-
#[AsCommand('enqueue:transport:consume')]
16+
#[AsCommand(self::COMMAND_NAME)]
1717
class ConsumeCommand extends Command
1818
{
1919
use ChooseLoggerCommandTrait;
2020
use LimitsExtensionsCommandTrait;
2121
use QueueConsumerOptionsCommandTrait;
2222

23+
private const COMMAND_NAME = 'enqueue:transport:consume';
24+
2325
/**
2426
* @var ContainerInterface
2527
*/
@@ -41,7 +43,7 @@ public function __construct(ContainerInterface $container, string $defaultTransp
4143
$this->defaultTransport = $defaultTransport;
4244
$this->queueConsumerIdPattern = $queueConsumerIdPattern;
4345

44-
parent::__construct(static::$defaultName);
46+
parent::__construct(self::COMMAND_NAME);
4547
}
4648

4749
protected function configure(): void

0 commit comments

Comments
 (0)