Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 31975e4

Browse files
committed
[FrameworkBundle][ContainerLintCommand] Reinitialize bundles when the container is reprepared
1 parent 70dec3c commit 31975e4

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Symfony/Bundle/FrameworkBundle/Command/ContainerLintCommand.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,11 @@ private function getContainerBuilder(): ContainerBuilder
6969
$kernel = $this->getApplication()->getKernel();
7070

7171
if (!$kernel->isDebug() || !(new ConfigCache($kernel->getContainer()->getParameter('debug.container.dump'), true))->isFresh()) {
72-
$buildContainer = \Closure::bind(function () { return $this->buildContainer(); }, $kernel, \get_class($kernel));
72+
$buildContainer = \Closure::bind(function (): ContainerBuilder {
73+
$this->initializeBundles();
74+
75+
return $this->buildContainer();
76+
}, $kernel, \get_class($kernel));
7377
$container = $buildContainer();
7478
} else {
7579
(new XmlFileLoader($container = new ContainerBuilder($parameterBag = new EnvPlaceholderParameterBag()), new FileLocator()))->load($kernel->getContainer()->getParameter('debug.container.dump'));

0 commit comments

Comments
 (0)