Skip to content

Commit

Permalink
bug #17505 sort bundles in config:dump-reference command (xabbuh)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
fabpot committed Jan 25, 2016
2 parents fb729ee + a5c8811 commit d44add2
Showing 1 changed file with 5 additions and 0 deletions.
Expand Up @@ -66,6 +66,11 @@ protected function execute(InputInterface $input, OutputInterface $output)

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() : ''));
Expand Down

0 comments on commit d44add2

Please sign in to comment.