minor #31766 [Yaml] drop support for mappings in multi-line blocks (xabbuh)
This PR was merged into the 5.0-dev branch.
Discussion
----------
[Yaml] drop support for mappings in multi-line blocks
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | yes
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Commits
-------
b80cff153a
drop support for mappings in multi-line blocks
This commit is contained in:
commit
f5d15f68af
@ -1,6 +1,11 @@
|
||||
CHANGELOG
|
||||
=========
|
||||
|
||||
5.0.0
|
||||
-----
|
||||
|
||||
* Removed support for mappings inside multi-line strings.
|
||||
|
||||
4.3.0
|
||||
-----
|
||||
|
||||
|
@ -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)) {
|
||||
|
@ -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()
|
||||
{
|
||||
|
Reference in New Issue
Block a user