[FrameworkBundle] AbstractConfigCommand: do not try registering bundles twice
This commit is contained in:
parent
62cb443770
commit
040edfec4a
@ -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
|
// 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.
|
// as this method is not called when the container is loaded from the cache.
|
||||||
$container = $this->getContainerBuilder();
|
$container = $this->getContainerBuilder();
|
||||||
$bundles = $this->getContainer()->get('kernel')->registerBundles();
|
$bundles = $this->getContainer()->get('kernel')->getBundles();
|
||||||
foreach ($bundles as $bundle) {
|
foreach ($bundles as $bundle) {
|
||||||
if ($extension = $bundle->getContainerExtension()) {
|
if ($extension = $bundle->getContainerExtension()) {
|
||||||
$container->registerExtension($extension);
|
$container->registerExtension($extension);
|
||||||
|
Reference in New Issue
Block a user