8000 Merge branch '2.8' into 3.1 · symfony/symfony@0f21c85 · GitHub
[go: up one dir, main page]

Skip to content

Commit 0f21c85

Browse files
Merge branch '2.8' into 3.1
* 2.8: [appveyor] Update phpunit-bridge cache-id handle empty lines inside unindented collection
2 parents e3e1cce + eced0da commit 0f21c85

File tree

3 files changed

+18
-2
lines changed

3 files changed

+18
-2
lines changed

phpunit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env php
22
<?php
33

4-
// Cache-Id: https://github.com/symfony/phpunit-bridge/commit/89cd0aab376105fb34e773e3dff641f68e3f9645
4+
// Cache-Id: https://github.com/symfony/phpunit-bridge/commit/a9037a65be5eeeb41f5693c0b4371aff821399f4
55

66
if (!file_exists(__DIR__.'/vendor/symfony/phpunit-bridge/bin/simple-phpunit')) {
77
echo "Unable to find the `simple-phpunit` script in `vendor/symfony/phpunit-bridge/bin/`.\nPlease run `composer update` before running this command.\n";

src/Symfony/Component/Yaml/Parser.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,7 @@ private function getNextEmbedBlock($indentation = null, $inSequence = false)
452452

453453
$previousLineIndentation = $indent;
454454

455-
if ($isItUnindentedCollection && !$this->isStringUnIndentedCollectionItem() && $newIndent === $indent) {
455+
if ($isItUnindentedCollection && !$this->isCurrentLineEmpty() && !$this->isStringUnIndentedCollectionItem() && $newIndent === $indent) {
456456
$this->moveToPreviousLine();
457457
break;
458458
}

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

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,22 @@ public function getBlockChompingTests()
189189
);
190190
$tests['Literal block chomping clip with multiple trailing newlines'] = array($expected, $yaml);
191191

192+
$yaml = <<<'EOF'
193+
foo:
194+
- bar: |
195+
one
196+
197+
two
198+
EOF;
199+
$expected = array(
200+
'foo' => array(
201+
array(
202+
'bar' => "one\n\ntwo",
203+
),
204+
),
205+
);
206+
$tests['Literal block chomping clip with embedded blank line inside unindented collection'] = array($expected, $yaml);
207+
192208
$yaml = <<<'EOF'
193209
foo: |
194210
one

0 commit comments

Comments
 (0)
0