Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitdd686d9

Browse files
committed
Auto-select a consumable receiver if there is only one
Resolves#51556
1 parent165ac69 commitdd686d9

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,12 @@ protected function interact(InputInterface $input, OutputInterface $output)
136136
$io =newSymfonyStyle($input,$outputinstanceof 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)

[8]ページ先頭

©2009-2025 Movatter.jp