From ce6ecaf862465740f9d48b0f8e329083ef239656 Mon Sep 17 00:00:00 2001 From: Roland Franssen Date: Sat, 1 Dec 2018 10:28:10 +0100 Subject: [PATCH] Add upgrade from 4.2 to 4.3 --- UPGRADE-4.2.md | 1 - UPGRADE-4.3.md | 7 +++++++ src/Symfony/Component/Config/CHANGELOG.md | 6 +++++- src/Symfony/Component/Config/Definition/VariableNode.php | 2 +- .../Tests/Compiler/ValidateEnvPlaceholdersPassTest.php | 2 +- 5 files changed, 14 insertions(+), 4 deletions(-) create mode 100644 UPGRADE-4.3.md diff --git a/UPGRADE-4.2.md b/UPGRADE-4.2.md index 7556a91eeda5..8d69d2c52625 100644 --- a/UPGRADE-4.2.md +++ b/UPGRADE-4.2.md @@ -29,7 +29,6 @@ Config ``` * Deprecated `FileLoaderLoadException`, use `LoaderLoadException` instead. - * Deprecated using environment variables with `cannotBeEmpty()` if the value is validated with `validate()` Console ------- diff --git a/UPGRADE-4.3.md b/UPGRADE-4.3.md new file mode 100644 index 000000000000..c88642f610ca --- /dev/null +++ b/UPGRADE-4.3.md @@ -0,0 +1,7 @@ +UPGRADE FROM 4.2 to 4.3 +======================= + +Config +------ + + * Deprecated using environment variables with `cannotBeEmpty()` if the value is validated with `validate()` diff --git a/src/Symfony/Component/Config/CHANGELOG.md b/src/Symfony/Component/Config/CHANGELOG.md index a2c1a2076a47..5b4f60a2722a 100644 --- a/src/Symfony/Component/Config/CHANGELOG.md +++ b/src/Symfony/Component/Config/CHANGELOG.md @@ -1,12 +1,16 @@ CHANGELOG ========= +4.3.0 +----- + + * deprecated using environment variables with `cannotBeEmpty()` if the value is validated with `validate()` + 4.2.0 ----- * deprecated constructing a `TreeBuilder` without passing root node information * renamed `FileLoaderLoadException` to `LoaderLoadException` - * deprecated using environment variables with `cannotBeEmpty()` if the value is validated with `validate()` 4.1.0 ----- diff --git a/src/Symfony/Component/Config/Definition/VariableNode.php b/src/Symfony/Component/Config/Definition/VariableNode.php index 93576870cf3e..0d722c6bd28a 100644 --- a/src/Symfony/Component/Config/Definition/VariableNode.php +++ b/src/Symfony/Component/Config/Definition/VariableNode.php @@ -84,7 +84,7 @@ protected function finalizeValue($value) // deny environment variables only when using custom validators // this avoids ever passing an empty value to final validation closures if (!$this->allowEmptyValue && $this->isHandlingPlaceholder() && $this->finalValidationClosures) { - @trigger_error(sprintf('Setting path "%s" to an environment variable is deprecated since Symfony 4.2. Remove "cannotBeEmpty()", "validate()" or include a prefix/suffix value instead.', $this->getPath()), E_USER_DEPRECATED); + @trigger_error(sprintf('Setting path "%s" to an environment variable is deprecated since Symfony 4.3. Remove "cannotBeEmpty()", "validate()" or include a prefix/suffix value instead.', $this->getPath()), E_USER_DEPRECATED); // $e = new InvalidConfigurationException(sprintf('The path "%s" cannot contain an environment variable when empty values are not allowed by definition and are validated.', $this->getPath(), json_encode($value))); // if ($hint = $this->getInfo()) { // $e->addHint($hint); diff --git a/src/Symfony/Component/DependencyInjection/Tests/Compiler/ValidateEnvPlaceholdersPassTest.php b/src/Symfony/Component/DependencyInjection/Tests/Compiler/ValidateEnvPlaceholdersPassTest.php index 90417f44d212..c544015d9016 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Compiler/ValidateEnvPlaceholdersPassTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Compiler/ValidateEnvPlaceholdersPassTest.php @@ -215,7 +215,7 @@ public function testEmptyEnvWhichCannotBeEmptyForScalarNode(): void * NOT LEGACY (test exception in 5.0). * * @group legacy - * @expectedDeprecation Setting path "env_extension.scalar_node_not_empty_validated" to an environment variable is deprecated since Symfony 4.2. Remove "cannotBeEmpty()", "validate()" or include a prefix/suffix value instead. + * @expectedDeprecation Setting path "env_extension.scalar_node_not_empty_validated" to an environment variable is deprecated since Symfony 4.3. Remove "cannotBeEmpty()", "validate()" or include a prefix/suffix value instead. */ public function testEmptyEnvWhichCannotBeEmptyForScalarNodeWithValidation(): void {