8000 [FrameworkBundle][DX] Sort bundles in config commands by kix · Pull Request #17485 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[FrameworkBundle][DX] Sort bundles in config commands #17485

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Sort bundles in config commands
  • Loading branch information
kix committed Jan 21, 2016
commit 7ccf774bedb69346b66fe367e670d4c85683b8a0
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,13 @@ protected function listBundles(OutputInterface $output)
{
$headers = array('Bundle name', 'Extension alias');
$rows = array();
foreach ($this->getContainer()->get('kernel')->getBundles() as $bundle) {

$bundles = $this->getContainer()->get('kernel')->getBundles();
usort($bundles, function($bundleA, $bundleB) {
return strcmp($bundleA->getName(), $bundleB->getName());
});

foreach ($bundles as $bundle) {
$extension = $bundle->getContainerExtension();
$rows[] = array($bundle->getName(), $extension ? $extension->getAlias() : '');
}
Expand Down
0