diff --git a/UPGRADE-4.2.md b/UPGRADE-4.2.md index 7556a91eed..8d69d2c526 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 0000000000..c88642f610 --- /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 a2c1a2076a..5b4f60a272 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 93576870cf..0d722c6bd2 100644 --- a/src/Symfony/Component/Config/Definition/VariableNode.php +++ b/src/Symfony/Component/Config/Definition/VariableNode.php @@ -84,7 +84,7 @@ class VariableNode extends BaseNode implements PrototypeNodeInterface // 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 90417f44d2..c544015d90 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Compiler/ValidateEnvPlaceholdersPassTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Compiler/ValidateEnvPlaceholdersPassTest.php @@ -215,7 +215,7 @@ class ValidateEnvPlaceholdersPassTest extends TestCase * 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 {