10000 Add completion to messenger:setup-transports command · symfony/symfony@199626a · GitHub
[go: up one dir, main page]

Skip to content

Commit 199626a

Browse files
committed
Add completion to messenger:setup-transports command
1 parent 89c55ea commit 199626a

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/Symfony/Component/Messenger/Command/SetupTransportsCommand.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,9 @@ protected function execute(InputInterface $input, OutputInterface $output)
8787
public function complete(CompletionInput $input, CompletionSuggestions $suggestions): void
8888
{
8989
if (!$input->mustSuggestArgumentValuesFor('transport')) {
90+
$suggestions->suggestValues($this->transportNames);
91+
9092
return;
9193
}
92-
93-
$suggestions->suggestValues($this->transportNames);
9494
}
9595
}

src/Symfony/Component/Messenger/Tests/Command/SetupTransportsCommandTest.php

-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,6 @@ public function testReceiverNameArgumentNotFound()
9494
*/
9595
public function testComplete(array $input, array $expectedSuggestions)
9696
{
97-
/** @var MockObject&ServiceLocator $serviceLocator */
9897
$serviceLocator = $this->createMock(ServiceLocator::class);
9998
$command = new SetupTransportsCommand($serviceLocator, ['amqp', 'other_transport']);
10099
$tester = new CommandCompletionTester($command);

0 commit comments

Comments
 (0)
0