10000 Improve debug:container command · symfony/symfony@3c6043e · GitHub
[go: up one dir, main page]

Skip to content

Commit 3c6043e

Browse files
committed
Improve debug:container command
1 parent 80f3410 commit 3c6043e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Symfony/Bundle/FrameworkBundle/Command/ContainerDebugCommand.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,9 @@ private function findProperServiceName(InputInterface $input, SymfonyStyle $io,
192192
throw new \InvalidArgumentException(sprintf('No services found that match "%s".', $name));
193193
}
194194

195-
return $io->choice('Select one of the following services to display its information', $matchingServices);
195+
$default = 1 === count($matchingServices) ? $matchingServices[0] : null;
196+
197+
return $io->choice('Select one of the following services to display its information', $matchingServices, $default);
196198
}
197199

198200
private function findServiceIdsContaining(ContainerBuilder $builder, $name)

0 commit comments

Comments
 (0)
0