From 0b46166174c18d53d7d5dc4fdf56e3864d674c5b Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Mon, 28 Aug 2017 13:30:14 -0700 Subject: [PATCH 1/4] bumped Symfony version to 3.3.8 --- src/Symfony/Component/HttpKernel/Kernel.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Symfony/Component/HttpKernel/Kernel.php b/src/Symfony/Component/HttpKernel/Kernel.php index 815841ec6c84f..4c333008cd927 100644 --- a/src/Symfony/Component/HttpKernel/Kernel.php +++ b/src/Symfony/Component/HttpKernel/Kernel.php @@ -61,12 +61,12 @@ abstract class Kernel implements KernelInterface, TerminableInterface private $projectDir; - const VERSION = '3.3.7'; - const VERSION_ID = 30307; + const VERSION = '3.3.8-DEV'; + const VERSION_ID = 30308; const MAJOR_VERSION = 3; const MINOR_VERSION = 3; - const RELEASE_VERSION = 7; - const EXTRA_VERSION = ''; + const RELEASE_VERSION = 8; + const EXTRA_VERSION = 'DEV'; const END_OF_MAINTENANCE = '01/2018'; const END_OF_LIFE = '07/2018'; From a8397cf1c7dfb1cad42927660a483605b5ae4f86 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Tue, 29 Aug 2017 00:20:37 +0200 Subject: [PATCH 2/4] [DI] Fix tracking env var placeholders nested in object graphs --- .../MergeExtensionConfigurationPass.php | 34 +++++++------------ .../MergeExtensionConfigurationPassTest.php | 2 +- 2 files changed, 13 insertions(+), 23 deletions(-) diff --git a/src/Symfony/Component/DependencyInjection/Compiler/MergeExtensionConfigurationPass.php b/src/Symfony/Component/DependencyInjection/Compiler/MergeExtensionConfigurationPass.php index 3e4acf5664e76..853b1fd05e96e 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/MergeExtensionConfigurationPass.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/MergeExtensionConfigurationPass.php @@ -95,7 +95,18 @@ public function __construct(parent $parameterBag) public function freezeAfterProcessing(Extension $extension) { $this->processedEnvPlaceholders = array(); - $this->processMergedConfig($extension->getProcessedConfigs(), parent::getEnvPlaceholders()); + + // serialize config to catch env vars nested in object graphs + $config = serialize($extension->getProcessedConfigs()); + + foreach (parent::getEnvPlaceholders() as $env => $placeholders) { + foreach ($placeholders as $placeholder) { + if (false !== stripos($config, $placeholder)) { + $this->processedEnvPlaceholders[$env] = $placeholders; + break; + } + } + } } /** @@ -105,25 +116,4 @@ public function getEnvPlaceholders() { return null !== $this->processedEnvPlaceholders ? $this->processedEnvPlaceholders : parent::getEnvPlaceholders(); } - - private function processMergedConfig($value, array $envPlaceholders) - { - if (is_array($value)) { - foreach ($value as $k => $v) { - $this->processMergedConfig($k, $envPlaceholders); - $this->processMergedConfig($v, $envPlaceholders); - } - } elseif (is_string($value)) { - foreach ($envPlaceholders as $env => $placeholders) { - foreach ($placeholders as $placeholder) { - if (false !== stripos($value, $placeholder)) { - $this->processedEnvPlaceholders[$env] = $placeholders; - break; - } - } - } - } - - return $value; - } } diff --git a/src/Symfony/Component/DependencyInjection/Tests/Compiler/MergeExtensionConfigurationPassTest.php b/src/Symfony/Component/DependencyInjection/Tests/Compiler/MergeExtensionConfigurationPassTest.php index 033e6c00fc342..44d1933a80fa8 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Compiler/MergeExtensionConfigurationPassTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Compiler/MergeExtensionConfigurationPassTest.php @@ -81,7 +81,7 @@ public function testOverriddenEnvsAreMerged() $pass = new MergeExtensionConfigurationPass(); $pass->process($container); - $this->assertSame(array('FOO', 'BAZ'), array_keys($container->getParameterBag()->getEnvPlaceholders())); + $this->assertSame(array('BAZ', 'FOO'), array_keys($container->getParameterBag()->getEnvPlaceholders())); $this->assertSame(array('BAZ' => 1, 'FOO' => 0), $container->getEnvCounters()); } } From 04e7d44d129572cd717f6fc1ed5182f3f0425f78 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Mon, 28 Aug 2017 15:34:58 -0700 Subject: [PATCH 3/4] updated CHANGELOG for 3.3.8 --- CHANGELOG-3.3.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG-3.3.md b/CHANGELOG-3.3.md index 185d1432cc409..3331ea2a1d1fa 100644 --- a/CHANGELOG-3.3.md +++ b/CHANGELOG-3.3.md @@ -7,6 +7,10 @@ in 3.3 minor versions. To get the diff for a specific change, go to https://github.com/symfony/symfony/commit/XXX where XXX is the change hash To get the diff between two versions, go to https://github.com/symfony/symfony/compare/v3.3.0...v3.3.1 +* 3.3.8 (2017-08-28) + + * bug #24016 [DI] Fix tracking env var placeholders nested in object graphs (nicolas-grekas) + * 3.3.7 (2017-08-28) * bug #24009 [DI] Fix tracking env vars when merging configs (bis) (nicolas-grekas) From bad5b6293dae27b763c66c1f71ff435b71e06809 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Mon, 28 Aug 2017 15:35:03 -0700 Subject: [PATCH 4/4] updated VERSION for 3.3.8 --- src/Symfony/Component/HttpKernel/Kernel.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Component/HttpKernel/Kernel.php b/src/Symfony/Component/HttpKernel/Kernel.php index 4c333008cd927..0fa9dbd5451b6 100644 --- a/src/Symfony/Component/HttpKernel/Kernel.php +++ b/src/Symfony/Component/HttpKernel/Kernel.php @@ -61,12 +61,12 @@ abstract class Kernel implements KernelInterface, TerminableInterface private $projectDir; - const VERSION = '3.3.8-DEV'; + const VERSION = '3.3.8'; const VERSION_ID = 30308; const MAJOR_VERSION = 3; const MINOR_VERSION = 3; const RELEASE_VERSION = 8; - const EXTRA_VERSION = 'DEV'; + const EXTRA_VERSION = ''; const END_OF_MAINTENANCE = '01/2018'; const END_OF_LIFE = '07/2018';