You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/Symfony/Component/Yaml/Inline.php
+9-7Lines changed: 9 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -415,6 +415,7 @@ public static function parseScalar(StringReader $reader, &$flags = 0, &$delimite
415
415
if (1 === strspn($scalar, '%', 0, 1)) {
416
416
@trigger_error(sprintf('Not quoting the scalar "%s" starting with the "%s" indicator character is deprecated since Symfony 3.1 and will throw a ParseException in 4.0.', $scalar, $scalar[0]), E_USER_DEPRECATED);
thrownewParseException(sprintf('Mapping keys must be strings or integers, type "%s" provided.', gettype($key)));
480
481
}
481
-
$reader->readSpan('');
482
-
$reader->expectChar(':');
482
+
if ($reader->readChar(':')) {
483
+
if (!$reader->readChar('')) {
484
+
@trigger_error('Omitting the space after the colon that follows a mapping key definition is deprecated since version 3.2 and will throw a ParseException in 4.0.', E_USER_DEPRECATED);
485
+
}
483
486
484
-
if (!$reader->readChar('')) {
485
-
@trigger_error('Omitting the space after the colon that follows a mapping key definition is deprecated since version 3.2 and will throw a ParseException in 4.0.', E_USER_DEPRECATED);
@trigger_error(sprintf('Duplicate key "%s" detected on line %d whilst parsing YAML. Silent handling of duplicate mapping keys in YAML is deprecated since version 3.2 and will throw \Symfony\Component\Yaml\Exception\ParseException in 4.0.', $key, self::$parsedLineNumber + 1), E_USER_DEPRECATED);
0 commit comments