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 b11e522

Browse filesBrowse files
committed
[Yaml] Simplified multi-line mapping condition + updated changelog and upgrade file accordingly
1 parent b8f5a8e commit b11e522
Copy full SHA for b11e522

File tree

Expand file treeCollapse file tree

5 files changed

+11
-7
lines changed
Filter options
Expand file treeCollapse file tree

5 files changed

+11
-7
lines changed

‎UPGRADE-4.3.md

Copy file name to clipboardExpand all lines: UPGRADE-4.3.md
+5Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,8 @@ Config
55
------
66

77
* Deprecated using environment variables with `cannotBeEmpty()` if the value is validated with `validate()`
8+
9+
Yaml
10+
----
11+
12+
* Using a mapping inside a multi-line string is deprecated and will throw a `ParseException` in 5.0.

‎UPGRADE-5.0.md

Copy file name to clipboardExpand all lines: UPGRADE-5.0.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,5 +277,5 @@ Workflow
277277
Yaml
278278
----
279279

280-
* The parser is now stricter and will trigger a deprecation notice when a
280+
* The parser is now stricter and will throw a `ParseException` when a
281281
mapping is found inside a multi-line string.

‎src/Symfony/Component/Yaml/CHANGELOG.md

Copy file name to clipboardExpand all lines: src/Symfony/Component/Yaml/CHANGELOG.md
+2-3Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
CHANGELOG
22
=========
33

4-
5.0.0
4+
4.3.0
55
-----
66

7-
* The parser is now stricter and will trigger a deprecation notice when a
8-
mapping is found inside a multi-line string.
7+
* Using a mapping inside a multi-line string is deprecated and will throw a `ParseException` in 5.0.
98

109
4.2.0
1110
-----

‎src/Symfony/Component/Yaml/Parser.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Yaml/Parser.php
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -391,8 +391,8 @@ private function doParse(string $value, int $flags)
391391
throw new ParseException('Unable to parse.', $this->getRealCurrentLineNb() + 1, $this->currentLine, $this->filename);
392392
}
393393

394-
if ($this->offset >= 1 && strpos($line, ': ')) {
395-
@trigger_error('Support for mapping keys in multiline blocks is deprecated since version 4.1.', E_USER_DEPRECATED);
394+
if (false !== strpos($line, ': ')) {
395+
@trigger_error('Support for mapping keys in multiline blocks is deprecated since version 4.3 and will throw a ParseException in 5.0.', E_USER_DEPRECATED);
396396
}
397397

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

‎src/Symfony/Component/Yaml/Tests/ParserTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Yaml/Tests/ParserTest.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -527,7 +527,7 @@ public function testObjectsSupportDisabledWithExceptions()
527527

528528
/**
529529
* @group legacy
530-
* @expectedDeprecation Support for mapping keys in multiline blocks is deprecated since version 4.1.
530+
* @expectedDeprecation Support for mapping keys in multiline blocks is deprecated since version 4.3 and will throw a ParseException in 5.0.
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.