Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 8de8869

Browse filesBrowse files
[FrameworkBundle] Fix eager-loading of env vars in ConfigBuilderCacheWarmer
1 parent 9a4b832 commit 8de8869
Copy full SHA for 8de8869

File tree

1 file changed

+5
-1
lines changed
Filter options

1 file changed

+5
-1
lines changed

‎src/Symfony/Bundle/FrameworkBundle/CacheWarmer/ConfigBuilderCacheWarmer.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/CacheWarmer/ConfigBuilderCacheWarmer.php
+5-1Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,12 @@
1515
use Symfony\Component\Config\Builder\ConfigBuilderGenerator;
1616
use Symfony\Component\Config\Builder\ConfigBuilderGeneratorInterface;
1717
use Symfony\Component\Config\Definition\ConfigurationInterface;
18+
use Symfony\Component\DependencyInjection\Container;
1819
use Symfony\Component\DependencyInjection\ContainerBuilder;
1920
use Symfony\Component\DependencyInjection\Extension\ConfigurationExtensionInterface;
2021
use Symfony\Component\DependencyInjection\Extension\ExtensionInterface;
22+
use Symfony\Component\DependencyInjection\ParameterBag\ContainerBag;
23+
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag;
2124
use Symfony\Component\HttpKernel\CacheWarmer\CacheWarmerInterface;
2225
use Symfony\Component\HttpKernel\KernelInterface;
2326

@@ -71,7 +74,8 @@ private function dumpExtension(ExtensionInterface $extension, ConfigBuilderGener
7174
if ($extension instanceof ConfigurationInterface) {
7275
$configuration = $extension;
7376
} elseif ($extension instanceof ConfigurationExtensionInterface) {
74-
$configuration = $extension->getConfiguration([], new ContainerBuilder($this->kernel->getContainer()->getParameterBag()));
77+
$container = $this->kernel->getContainer();
78+
$configuration = $extension->getConfiguration([], new ContainerBuilder($container instanceof Container ? new ContainerBag($container) : new ParameterBag()));
7579
}
7680

7781
if (!$configuration) {

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.