From 5ff45bac6669c3269f460c5490d0c8f754a5fcf2 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Thu, 4 Jul 2019 10:44:43 +0200 Subject: [PATCH 1/2] [FrameworkBundle] reset cache pools between requests --- .../FrameworkBundle/Resources/config/cache.xml | 14 +++++++------- .../DependencyInjection/FrameworkExtensionTest.php | 5 ----- 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/src/Symfony/Bundle/FrameworkBundle/Resources/config/cache.xml b/src/Symfony/Bundle/FrameworkBundle/Resources/config/cache.xml index 36db49a497..a7aaaec7c0 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Resources/config/cache.xml +++ b/src/Symfony/Bundle/FrameworkBundle/Resources/config/cache.xml @@ -8,7 +8,7 @@ - + @@ -29,7 +29,7 @@ - + 0 @@ -39,7 +39,7 @@ - + 0 @@ -50,7 +50,7 @@ - + @@ -61,7 +61,7 @@ - + 0 @@ -72,14 +72,14 @@ - + 0 - + diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php index 51b4ff1524..73c33a3f50 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php @@ -19,7 +19,6 @@ use Symfony\Bundle\FullStack; use Symfony\Component\Cache\Adapter\AdapterInterface; use Symfony\Component\Cache\Adapter\ApcuAdapter; use Symfony\Component\Cache\Adapter\ArrayAdapter; -use Symfony\Component\Cache\Adapter\ChainAdapter; use Symfony\Component\Cache\Adapter\DoctrineAdapter; use Symfony\Component\Cache\Adapter\FilesystemAdapter; use Symfony\Component\Cache\Adapter\ProxyAdapter; @@ -1244,10 +1243,6 @@ abstract class FrameworkExtensionTest extends TestCase $this->assertSame(DoctrineAdapter::class, $parentDefinition->getClass()); break; case 'cache.app': - if (ChainAdapter::class === $parentDefinition->getClass()) { - break; - } - // no break case 'cache.adapter.filesystem': $this->assertSame(FilesystemAdapter::class, $parentDefinition->getClass()); break; From b06d0003a3ab73d7e583cfb687d43e8e5a0c0870 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Thu, 4 Jul 2019 11:24:58 +0200 Subject: [PATCH 2/2] [DI] fix processing of regular parameter bags by MergeExtensionConfigurationPass --- .../Compiler/MergeExtensionConfigurationPass.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Symfony/Component/DependencyInjection/Compiler/MergeExtensionConfigurationPass.php b/src/Symfony/Component/DependencyInjection/Compiler/MergeExtensionConfigurationPass.php index 63f8013c31..caa1fd2251 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/MergeExtensionConfigurationPass.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/MergeExtensionConfigurationPass.php @@ -186,6 +186,10 @@ class MergeExtensionConfigurationContainerBuilder extends ContainerBuilder $bag = $this->getParameterBag(); $value = $bag->resolveValue($value); + if (!$bag instanceof EnvPlaceholderParameterBag) { + return parent::resolveEnvPlaceholders($value, $format, $usedEnvs); + } + foreach ($bag->getEnvPlaceholders() as $env => $placeholders) { if (false === strpos($env, ':')) { continue;