[FrameworkBundle] AbstractConfigCommand: do not try registering bundles twice

This commit is contained in:
Maxime Steinhausser 2017-05-08 10:50:08 +02:00
parent 62cb443770
commit 040edfec4a
1 changed files with 1 additions and 1 deletions

View File

@ -95,7 +95,7 @@ abstract class AbstractConfigCommand extends ContainerDebugCommand
// Re-build bundle manually to initialize DI extensions that can be extended by other bundles in their build() method
// as this method is not called when the container is loaded from the cache.
$container = $this->getContainerBuilder();
$bundles = $this->getContainer()->get('kernel')->registerBundles();
$bundles = $this->getContainer()->get('kernel')->getBundles();
foreach ($bundles as $bundle) {
if ($extension = $bundle->getContainerExtension()) {
$container->registerExtension($extension);