Skip to content

Commit b8436a3

Browse files
[FrameworkBundle] fix creating ContainerBuilder at warmup/CLI time
1 parent e0838d4 commit b8436a3

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Command/BuildDebugContainerTrait.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,11 @@ protected function getContainerBuilder(KernelInterface $kernel): ContainerBuilde
4040
}
4141

4242
if (!$kernel->isDebug() || !(new ConfigCache($kernel->getContainer()->getParameter('debug.container.dump'), true))->isFresh()) {
43-
$buildContainer = \Closure::bind(function () { return $this->buildContainer(); }, $kernel, \get_class($kernel));
43+
$buildContainer = \Closure::bind(function () {
44+
$this->initializeBundles();
45+
46+
return $this->buildContainer();
47+
}, $kernel, \get_class($kernel));
4448
$container = $buildContainer();
4549
$container->getCompilerPassConfig()->setRemovingPasses([]);
4650
$container->getCompilerPassConfig()->setAfterRemovingPasses([]);

0 commit comments

Comments
 (0)