Skip to content

Commit

Permalink
collect extension information as late as possible
Browse files Browse the repository at this point in the history
  • Loading branch information
xabbuh committed Jan 24, 2018
1 parent af4b469 commit 58cdbd0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Symfony/Component/HttpKernel/Kernel.php
Expand Up @@ -700,7 +700,6 @@ protected function prepareContainer(ContainerBuilder $container)
foreach ($this->bundles as $bundle) {
if ($extension = $bundle->getContainerExtension()) {
$container->registerExtension($extension);
$extensions[] = $extension->getAlias();
}

if ($this->debug) {
Expand All @@ -714,6 +713,10 @@ protected function prepareContainer(ContainerBuilder $container)

$this->build($container);

foreach ($container->getExtensions() as $extension) {
$extensions[] = $extension->getAlias();
}

// ensure these extensions are implicitly loaded
$container->getCompilerPassConfig()->setMergePass(new MergeExtensionConfigurationPass($extensions));
}
Expand Down

0 comments on commit 58cdbd0

Please sign in to comment.