Skip to content

Commit 59e55b6

Browse files
authored
Merge pull request #32 from xseguib/master
Fix "command defined in ....\SetupBrokerCommand" cannot have an empty name and configure() must be compatible with Enqueue\Symfony\Client\SetupBrokerCommand::configure(): void
2 parents e17dd1e + edd0653 commit 59e55b6

File tree

4 files changed

+8
-7
lines changed

4 files changed

+8
-7
lines changed

Diff for: src/Command/ConsumeCommand.php

+2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33

44
use Enqueue\SimpleClient\SimpleClient;
55
use Enqueue\Symfony\Client\SimpleConsumeCommand;
6+
use Symfony\Component\Console\Attribute\AsCommand;
67

8+
#[AsCommand(name: 'enqueue:consume')]
79
class ConsumeCommand extends SimpleConsumeCommand
810
{
911
public function __construct(SimpleClient $client)

Diff for: src/Command/ProduceCommand.php

+2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33

44
use Enqueue\SimpleClient\SimpleClient;
55
use Enqueue\Symfony\Client\SimpleProduceCommand;
6+
use Symfony\Component\Console\Attribute\AsCommand;
67

8+
#[AsCommand(name: 'enqueue:produce')]
79
class ProduceCommand extends SimpleProduceCommand
810
{
911
public function __construct(SimpleClient $client)

Diff for: src/Command/RoutesCommand.php

+2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33

44
use Enqueue\SimpleClient\SimpleClient;
55
use Enqueue\Symfony\Client\SimpleRoutesCommand;
6+
use Symfony\Component\Console\Attribute\AsCommand;
67

8+
#[AsCommand(name: 'enqueue:routes')]
79
class RoutesCommand extends SimpleRoutesCommand
810
{
911
public function __construct(SimpleClient $client)

Diff for: src/Command/SetupBrokerCommand.php

+2-7
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,13 @@
33

44
use Enqueue\SimpleClient\SimpleClient;
55
use Enqueue\Symfony\Client\SimpleSetupBrokerCommand;
6+
use Symfony\Component\Console\Attribute\AsCommand;
67

8+
#[AsCommand(name: 'enqueue:setup-broker')]
79
class SetupBrokerCommand extends SimpleSetupBrokerCommand
810
{
911
public function __construct(SimpleClient $client)
1012
{
1113
parent::__construct($client->getDriver());
1214
}
13-
14-
protected function configure()
15-
{
16-
parent::configure();
17-
18-
$this->setName('enqueue:setup-broker');
19-
}
2015
}

0 commit comments

Comments
 (0)