From a5c881182f2c471dac9b9fbd8b6d52375c39672d Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Sat, 23 Jan 2016 17:38:15 +0100 Subject: [PATCH] sort bundles in config:dump-reference command This backports #17495 to the `2.3` branch. --- .../FrameworkBundle/Command/ConfigDumpReferenceCommand.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/ConfigDumpReferenceCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/ConfigDumpReferenceCommand.php index fa978b3ba9..e116d83e88 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/ConfigDumpReferenceCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/ConfigDumpReferenceCommand.php @@ -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() : ''));