Skip to content

Commit

Permalink
[FrameworkBundle] fix ConfigBuilderCacheWarmer
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-grekas committed May 31, 2021
1 parent b8436a3 commit 9919637
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions CacheWarmer/ConfigBuilderCacheWarmer.php
Expand Up @@ -12,10 +12,10 @@
namespace Symfony\Bundle\FrameworkBundle\CacheWarmer;

use Psr\Log\LoggerInterface;
use Symfony\Bundle\FrameworkBundle\Command\BuildDebugContainerTrait;
use Symfony\Component\Config\Builder\ConfigBuilderGenerator;
use Symfony\Component\Config\Builder\ConfigBuilderGeneratorInterface;
use Symfony\Component\Config\Definition\ConfigurationInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Extension\ConfigurationExtensionInterface;
use Symfony\Component\DependencyInjection\Extension\ExtensionInterface;
use Symfony\Component\HttpKernel\CacheWarmer\CacheWarmerInterface;
Expand All @@ -28,8 +28,6 @@
*/
class ConfigBuilderCacheWarmer implements CacheWarmerInterface
{
use BuildDebugContainerTrait;

private $kernel;
private $logger;

Expand Down Expand Up @@ -73,7 +71,7 @@ private function dumpExtension(ExtensionInterface $extension, ConfigBuilderGener
if ($extension instanceof ConfigurationInterface) {
$configuration = $extension;
} elseif ($extension instanceof ConfigurationExtensionInterface) {
$configuration = $extension->getConfiguration([], $this->getContainerBuilder($this->kernel));
$configuration = $extension->getConfiguration([], new ContainerBuilder($this->kernel->getContainer()->getParameterBag()));
}

if (!$configuration) {
Expand Down

0 comments on commit 9919637

Please sign in to comment.