Skip to content

Commit d44add2

Browse files
committed
bug #17505 sort bundles in config:dump-reference command (xabbuh)
This PR was merged into the 2.3 branch. Discussion ---------- sort bundles in config:dump-reference command | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | | License | MIT | Doc PR | This backports #17495 to the `2.3` branch. Commits ------- a5c8811 sort bundles in config:dump-reference command
2 parents fb729ee + a5c8811 commit d44add2

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,11 @@ protected function execute(InputInterface $input, OutputInterface $output)
6666

6767
if (empty($name)) {
6868
$output->writeln('Available registered bundles with their extension alias if available:');
69+
70+
usort($bundles, function($bundleA, $bundleB) {
71+
return strcmp($bundleA->getName(), $bundleB->getName());
72+
});
73+
6974
foreach ($bundles as $bundle) {
7075
$extension = $bundle->getContainerExtension();
7176
$output->writeln($bundle->getName().($extension ? ': '.$extension->getAlias() : ''));

0 commit comments

Comments
 (0)