Skip to content

Fix "command defined in ....\SetupBrokerCommand" cannot have an empty name and configure() must be compatible with Enqueue\Symfony\Client\SetupBrokerCommand::configure(): void #32

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Apr 4, 2025
2 changes: 2 additions & 0 deletions src/Command/ConsumeCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 2 additions & 0 deletions src/Command/ProduceCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 2 additions & 0 deletions src/Command/RoutesCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
9 changes: 2 additions & 7 deletions src/Command/SetupBrokerCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,13 @@

use Enqueue\SimpleClient\SimpleClient;
use Enqueue\Symfony\Client\SimpleSetupBrokerCommand;
use Symfony\Component\Console\Attribute\AsCommand;

#[AsCommand(name: 'enqueue:setup-broker')]
class SetupBrokerCommand extends SimpleSetupBrokerCommand
{
public function __construct(SimpleClient $client)
{
parent::__construct($client->getDriver());
}

protected function configure()
{
parent::configure();

$this->setName('enqueue:setup-broker');
}
}