From 8cbfa1eaf3080989b1028ea01d519f45c2be9465 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Sun, 3 Dec 2017 17:18:19 +0100 Subject: [PATCH] [FrameworkBundle] debug:autowiring: don't list FQCN when they are aliased --- .../FrameworkBundle/Command/DebugAutowiringCommand.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/DebugAutowiringCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/DebugAutowiringCommand.php index 23d688495db74..41c9cc9fabc19 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/DebugAutowiringCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/DebugAutowiringCommand.php @@ -85,13 +85,17 @@ protected function execute(InputInterface $input, OutputInterface $output) } $io->newLine(); $tableRows = array(); + $hasAlias = array(); foreach ($serviceIds as $serviceId) { - $tableRows[] = array(sprintf('%s', $serviceId)); if ($builder->hasAlias($serviceId)) { + $tableRows[] = array(sprintf('%s', $serviceId)); $tableRows[] = array(sprintf(' alias to %s', $builder->getAlias($serviceId))); + $hasAlias[(string) $builder->getAlias($serviceId)] = true; + } else { + $tableRows[$serviceId] = array(sprintf('%s', $serviceId)); } } - $io->table(array(), $tableRows); + $io->table(array(), array_diff_key($tableRows, $hasAlias)); } }