Add upgrade from 4.2 to 4.3

This commit is contained in:
Roland Franssen 2018-12-01 10:28:10 +01:00
parent cc0be40e82
commit ce6ecaf862
5 changed files with 14 additions and 4 deletions

View File

@ -29,7 +29,6 @@ Config
```
* Deprecated `FileLoaderLoadException`, use `LoaderLoadException` instead.
* Deprecated using environment variables with `cannotBeEmpty()` if the value is validated with `validate()`
Console
-------

7
UPGRADE-4.3.md Normal file
View File

@ -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()`

View File

@ -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
-----

View File

@ -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);

View File

@ -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
{