drop support for mappings in multi-line blocks

This commit is contained in:
Christian Flothmann 2019-05-31 12:46:22 +02:00
parent 2a631ecb83
commit b80cff153a
3 changed files with 8 additions and 3 deletions

View File

@ -1,6 +1,11 @@
CHANGELOG
=========
5.0.0
-----
* Removed support for mappings inside multi-line strings.
4.3.0
-----

View File

@ -392,7 +392,7 @@ class Parser
}
if (false !== strpos($line, ': ')) {
@trigger_error('Support for mapping keys in multi-line blocks is deprecated since Symfony 4.3 and will throw a ParseException in 5.0.', E_USER_DEPRECATED);
throw new ParseException('Mapping values are not allowed in multi-line blocks.', $this->getRealCurrentLineNb() + 1, $this->currentLine, $this->filename);
}
if ('' === trim($line)) {

View File

@ -526,8 +526,8 @@ EOF;
}
/**
* @group legacy
* @expectedDeprecation Support for mapping keys in multi-line blocks is deprecated since Symfony 4.3 and will throw a ParseException in 5.0.
* @expectedException \Symfony\Component\Yaml\Exception\ParseException
* @expectedExceptionMessage Mapping values are not allowed in multi-line blocks at line 2 (near "dbal:wrong").
*/
public function testMappingKeyInMultiLineStringTriggersDeprecationNotice()
{