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
This commit is contained in:
Fabien Potencier 2016-01-25 08:33:31 +01:00
commit d44add24b2
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() : ''));