Skip to content

Commit

Permalink
Add upgrade from 4.2 to 4.3
Browse files Browse the repository at this point in the history
  • Loading branch information
ro0NL committed Dec 1, 2018
1 parent cc0be40 commit ce6ecaf
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 4 deletions.
1 change: 0 additions & 1 deletion UPGRADE-4.2.md
Expand Up @@ -29,7 +29,6 @@ Config
```

* Deprecated `FileLoaderLoadException`, use `LoaderLoadException` instead.
* Deprecated using environment variables with `cannotBeEmpty()` if the value is validated with `validate()`

Console
-------
Expand Down
7 changes: 7 additions & 0 deletions 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()`
6 changes: 5 additions & 1 deletion 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
-----
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Component/Config/Definition/VariableNode.php
Expand Up @@ -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);
Expand Down
Expand Up @@ -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
{
Expand Down

0 comments on commit ce6ecaf

Please sign in to comment.