From bbfe6f73b527a55b748913d2801eeb50baa90c51 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Wed, 28 Dec 2016 19:13:31 +0100 Subject: [PATCH 1/2] handle empty lines inside unindented collection --- src/Symfony/Component/Yaml/Parser.php | 2 +- src/Symfony/Component/Yaml/Tests/ParserTest.php | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/src/Symfony/Component/Yaml/Parser.php b/src/Symfony/Component/Yaml/Parser.php index 24f666e40e..f3528ba24f 100644 --- a/src/Symfony/Component/Yaml/Parser.php +++ b/src/Symfony/Component/Yaml/Parser.php @@ -423,7 +423,7 @@ class Parser $previousLineIndentation = $indent; - if ($isItUnindentedCollection && !$this->isStringUnIndentedCollectionItem() && $newIndent === $indent) { + if ($isItUnindentedCollection && !$this->isCurrentLineEmpty() && !$this->isStringUnIndentedCollectionItem() && $newIndent === $indent) { $this->moveToPreviousLine(); break; } diff --git a/src/Symfony/Component/Yaml/Tests/ParserTest.php b/src/Symfony/Component/Yaml/Tests/ParserTest.php index 42b764e03e..e1e0d5a614 100644 --- a/src/Symfony/Component/Yaml/Tests/ParserTest.php +++ b/src/Symfony/Component/Yaml/Tests/ParserTest.php @@ -189,6 +189,22 @@ EOF; ); $tests['Literal block chomping clip with multiple trailing newlines'] = array($expected, $yaml); + $yaml = <<<'EOF' +foo: +- bar: | + one + + two +EOF; + $expected = array( + 'foo' => array( + array( + 'bar' => "one\n\ntwo", + ), + ), + ); + $tests['Literal block chomping clip with embedded blank line inside unindented collection'] = array($expected, $yaml); + $yaml = <<<'EOF' foo: | one From 5044c9875c6619fab0f3049daeaa50c15274aa7f Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Tue, 3 Jan 2017 14:47:01 +0100 Subject: [PATCH 2/2] [appveyor] Update phpunit-bridge cache-id --- phpunit | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpunit b/phpunit index 4f83ee83ae..217d23ad83 100755 --- a/phpunit +++ b/phpunit @@ -1,7 +1,7 @@ #!/usr/bin/env php