Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: symfony/yaml
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v4.0.8
Choose a base ref
...
head repository: symfony/yaml
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v4.0.9
Choose a head ref
  • 4 commits
  • 2 files changed
  • 2 contributors

Commits on Apr 6, 2018

  1. Copy the full SHA
    e2c80e6 View commit details

Commits on Apr 8, 2018

  1. Merge branch '2.7' into 2.8

    * 2.7:
      bumped Symfony version to 2.7.46
      updated VERSION for 2.7.45
      update CONTRIBUTORS for 2.7.45
      updated CHANGELOG for 2.7.45
      [Yaml] Throw parse error on unfinished inline map
    xabbuh committed Apr 8, 2018
    Copy the full SHA
    d20bd2b View commit details
  2. Merge branch '2.8' into 3.4

    * 2.8:
      bumped Symfony version to 2.8.39
      updated VERSION for 2.8.38
      updated CHANGELOG for 2.8.38
      bumped Symfony version to 2.7.46
      updated VERSION for 2.7.45
      update CONTRIBUTORS for 2.7.45
      updated CHANGELOG for 2.7.45
      [Yaml] Throw parse error on unfinished inline map
    xabbuh committed Apr 8, 2018
    Copy the full SHA
    033cfa6 View commit details
  3. Merge branch '3.4' into 4.0

    * 3.4:
      [Translation] Use unix-style EOL for xliff-core-1.2-strict.xsd
      bumped Symfony version to 3.4.9
      updated VERSION for 3.4.8
      updated CHANGELOG for 3.4.8
      bumped Symfony version to 2.8.39
      updated VERSION for 2.8.38
      updated CHANGELOG for 2.8.38
      bumped Symfony version to 2.7.46
      updated VERSION for 2.7.45
      update CONTRIBUTORS for 2.7.45
      updated CHANGELOG for 2.7.45
      [Yaml] Throw parse error on unfinished inline map
    xabbuh committed Apr 8, 2018
    Copy the full SHA
    275ad09 View commit details
Showing with 12 additions and 0 deletions.
  1. +3 −0 Inline.php
  2. +9 −0 Tests/InlineTest.php
3 changes: 3 additions & 0 deletions Inline.php
Original file line number Diff line number Diff line change
@@ -269,6 +269,9 @@ public static function parseScalar(string $scalar, int $flags = 0, array $delimi

if (null !== $delimiters) {
$tmp = ltrim(substr($scalar, $i), ' ');
if ('' === $tmp) {
throw new ParseException(sprintf('Unexpected end of line, expected one of "%s".', implode($delimiters)), self::$parsedLineNumber + 1, $scalar, self::$parsedFilename);
}
if (!in_array($tmp[0], $delimiters)) {
throw new ParseException(sprintf('Unexpected characters (%s).', substr($scalar, $i)), self::$parsedLineNumber + 1, $scalar, self::$parsedFilename);
}
9 changes: 9 additions & 0 deletions Tests/InlineTest.php
Original file line number Diff line number Diff line change
@@ -748,4 +748,13 @@ public function testTagWithEmptyValueInMapping()
$this->assertSame('bar', $value['foo']->getTag());
$this->assertSame('', $value['foo']->getValue());
}

/**
* @expectedException \Symfony\Component\Yaml\Exception\ParseException
* @expectedExceptionMessage Unexpected end of line, expected one of ",}" at line 1 (near "{abc: 'def'").
*/
public function testUnfinishedInlineMap()
{
Inline::parse("{abc: 'def'");
}
}