Skip to content

Commit e8c2d1d

Browse files
committed
Improve debug:container command
1 parent f718eec commit e8c2d1d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

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)