[FrameworkBundle] debug:autowiring: don't list FQCN when they are aliased

This commit is contained in:
Nicolas Grekas 2017-12-03 17:18:19 +01:00
parent a603ba0bee
commit 8cbfa1eaf3

View File

@ -85,13 +85,17 @@ EOF
}
$io->newLine();
$tableRows = array();
$hasAlias = array();
foreach ($serviceIds as $serviceId) {
$tableRows[] = array(sprintf('<fg=cyan>%s</fg=cyan>', $serviceId));
if ($builder->hasAlias($serviceId)) {
$tableRows[] = array(sprintf('<fg=cyan>%s</fg=cyan>', $serviceId));
$tableRows[] = array(sprintf(' alias to %s', $builder->getAlias($serviceId)));
$hasAlias[(string) $builder->getAlias($serviceId)] = true;
} else {
$tableRows[$serviceId] = array(sprintf('<fg=cyan>%s</fg=cyan>', $serviceId));
}
}
$io->table(array(), $tableRows);
$io->table(array(), array_diff_key($tableRows, $hasAlias));
}
}