Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit e464640

Browse filesBrowse files
committed
drop support for mappings in multi-line blocks
1 parent 1ae0b34 commit e464640
Copy full SHA for e464640

File tree

3 files changed

+8
-3
lines changed
Filter options

3 files changed

+8
-3
lines changed

‎CHANGELOG.md

Copy file name to clipboardExpand all lines: CHANGELOG.md
+5Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
CHANGELOG
22
=========
33

4+
5.0.0
5+
-----
6+
7+
* Removed support for mappings inside multi-line strings.
8+
49
4.3.0
510
-----
611

‎Parser.php

Copy file name to clipboardExpand all lines: Parser.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ private function doParse(string $value, int $flags)
392392
}
393393

394394
if (false !== strpos($line, ': ')) {
395-
@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);
395+
throw new ParseException('Mapping values are not allowed in multi-line blocks.', $this->getRealCurrentLineNb() + 1, $this->currentLine, $this->filename);
396396
}
397397

398398
if ('' === trim($line)) {

‎Tests/ParserTest.php

Copy file name to clipboardExpand all lines: Tests/ParserTest.php
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -526,8 +526,8 @@ public function testObjectsSupportDisabledWithExceptions()
526526
}
527527

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

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.