From 07ca9f4831a1a77329d75ff4f85a0584db79795d Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Fri, 7 Jun 2019 22:38:23 +0200 Subject: [PATCH 1/2] [SecurityBundle] add missing contraint for symfony/config dep --- src/Symfony/Bundle/SecurityBundle/composer.json | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Symfony/Bundle/SecurityBundle/composer.json b/src/Symfony/Bundle/SecurityBundle/composer.json index 57d313d871..6faf933062 100644 --- a/src/Symfony/Bundle/SecurityBundle/composer.json +++ b/src/Symfony/Bundle/SecurityBundle/composer.json @@ -18,6 +18,7 @@ "require": { "php": "^5.5.9|>=7.0.8", "ext-xml": "*", + "symfony/config": "~3.4|~4.0", "symfony/security": "~3.4.15|~4.0.15|^4.1.4", "symfony/dependency-injection": "^3.4.3|^4.0.3", "symfony/http-kernel": "~3.4|~4.0", From 25b961aadc51ceda84eb99cba74145cae94651ad Mon Sep 17 00:00:00 2001 From: Roland Franssen Date: Fri, 7 Jun 2019 22:39:31 +0200 Subject: [PATCH 2/2] [DI] Fix suspicious test --- .../Exception/TreeWithoutRootNodeException.php | 2 ++ .../Tests/Compiler/ValidateEnvPlaceholdersPassTest.php | 9 ++++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/Symfony/Component/Config/Definition/Exception/TreeWithoutRootNodeException.php b/src/Symfony/Component/Config/Definition/Exception/TreeWithoutRootNodeException.php index 67b0c4bb2e..04406fc90b 100644 --- a/src/Symfony/Component/Config/Definition/Exception/TreeWithoutRootNodeException.php +++ b/src/Symfony/Component/Config/Definition/Exception/TreeWithoutRootNodeException.php @@ -13,6 +13,8 @@ namespace Symfony\Component\Config\Definition\Exception; /** * @author Roland Franssen + * + * @internal */ class TreeWithoutRootNodeException extends \RuntimeException { diff --git a/src/Symfony/Component/DependencyInjection/Tests/Compiler/ValidateEnvPlaceholdersPassTest.php b/src/Symfony/Component/DependencyInjection/Tests/Compiler/ValidateEnvPlaceholdersPassTest.php index 1a198bca5d..7e1de8f083 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Compiler/ValidateEnvPlaceholdersPassTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Compiler/ValidateEnvPlaceholdersPassTest.php @@ -226,16 +226,15 @@ class ValidateEnvPlaceholdersPassTest extends TestCase /** * @group legacy + * @expectedDeprecation A tree builder without a root node is deprecated since Symfony 4.2 and will not be supported anymore in 5.0. */ public function testConfigurationWithoutRootNode(): void { $container = new ContainerBuilder(); $container->registerExtension(new EnvExtension(new EnvConfigurationWithoutRootNode())); - $container->loadFromExtension('env_extension'); + $container->loadFromExtension('env_extension', ['foo' => 'bar']); - $this->doProcess($container); - - $this->addToAssertionCount(1); + (new ValidateEnvPlaceholdersPass())->process($container); } public function testEmptyConfigFromMoreThanOneSource() @@ -332,7 +331,7 @@ class EnvConfigurationWithoutRootNode implements ConfigurationInterface { public function getConfigTreeBuilder() { - return new TreeBuilder('env_extension'); + return new TreeBuilder(); } }