8000 Auto-select a consumable receiver if there is only one · symfony/symfony@dbef091 · GitHub
[go: up one dir, main page]

Skip to content

Commit dbef091

Browse files
committed
Auto-select a c 8000 onsumable receiver if there is only one
Resolves #51556
1 parent a7db3af commit dbef091

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

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

+6
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,12 @@ protected function interact(InputInterface $input, OutputInterface $output)
136136
$io = new SymfonyStyle($input, $output instanceof ConsoleOutputInterface ? $output->getErrorOutput() : $output);
137137

138138
if ($this->receiverNames && !$input->getArgument('receivers')) {
139+
if (1 === \count($this->receiverNames)) {
140+
$input->setArgument('receivers', $this->receiverNames);
141+
142+
return;
143+
}
144+
139145
$io->block('Which transports/receivers do you want to consume?', null, 'fg=white;bg=blue', ' ', true);
140146

141147
$io->writeln('Choose which receivers you want to consume messages from in order of priority.');

0 commit comments

Comments
 (0)
0