sort bundles in config:dump-reference command

This backports #17495 to the `2.3` branch.
This commit is contained in:
Christian Flothmann 2016-01-23 17:38:15 +01:00
parent 93b831b395
commit a5c881182f
1 changed files with 5 additions and 0 deletions

View File

@ -66,6 +66,11 @@ EOF
if (empty($name)) {
$output->writeln('Available registered bundles with their extension alias if available:');
usort($bundles, function($bundleA, $bundleB) {
return strcmp($bundleA->getName(), $bundleB->getName());
});
foreach ($bundles as $bundle) {
$extension = $bundle->getContainerExtension();
$output->writeln($bundle->getName().($extension ? ': '.$extension->getAlias() : ''));