8000 [FrameworkBundle] debug:autowiring: don't list aliases classes when t… · symfony/symfony@577dbd9 · GitHub
[go: up one dir, main page]

Skip to content

Commit 577dbd9

Browse files
[FrameworkBundle] debug:autowiring: don't list aliases classes when they are aliased
1 parent a603ba0 commit 577dbd9

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,13 +85,17 @@ protected function execute(InputInterface $input, OutputInterface $output)
8585
}
8686
$io->newLine();
8787
$tableRows = array();
88+
$hasAlias = array();
8889
foreach ($serviceIds as $serviceId) {
89-
$tableRows[] = array(sprintf('<fg=cyan>%s</fg=cyan>', $serviceId));
9090
if ($builder->hasAlias($serviceId)) {
91+
$tableRows[] = array(sprintf('<fg=cyan>%s</fg=cyan>', $serviceId));
9192
$tableRows[] = array(sprintf(' alias to %s', $builder->getAlias($serviceId)));
93+
$hasAlias[(string) $builder->getAlias($serviceId)] = true;
94+
} else {
95+
$tableRows[$serviceId] = array(sprintf('<fg=cyan>%s</fg=cyan>', $serviceId));
9296
}
9397
}
9498

95-
$io->table(array(), $tableRows);
99+
$io->table(array(), array_diff_key($tableRows, $hasAlias));
96100
}
97101
}

0 commit comments

Comments
 (0)
0