Skip to content

Commit

Permalink
[FrameworkBundle] debug:autowiring: don't list FQCN when they are ali…
Browse files Browse the repository at this point in the history
…ased
  • Loading branch information
nicolas-grekas committed Dec 3, 2017
1 parent a603ba0 commit 8cbfa1e
Showing 1 changed file with 6 additions and 2 deletions.
Expand Up @@ -85,13 +85,17 @@ protected function execute(InputInterface $input, OutputInterface $output)
}
$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));
}
}

0 comments on commit 8cbfa1e

Please sign in to comment.