Skip to content

Commit 69c5859

Browse files
committed
minor #46768 [Yaml] Remove legacy parsing rule (nicolas-grekas)
This PR was merged into the 6.2 branch. Discussion ---------- [Yaml] Remove legacy parsing rule | Q | A | ------------- | --- | Branch? | 6.2 | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | - | License | MIT | Doc PR | - As far as I understood correctly, this part of the regexp has been introduced in #22878 to support a syntax that has been deprecated in #22913 and removed in 4.0. Commits ------- 5d7f9f2 [Yaml] Remove legacy parsing rule
2 parents bbf25d6 + 5d7f9f2 commit 69c5859

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/Yaml/Parser.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ private function doParse(string $value, int $flags)
201201
array_pop($this->refsBeingParsed);
202202
}
203203
} elseif (
204-
self::preg_match('#^(?P<key>(?:![^\s]++\s++)?(?:'.Inline::REGEX_QUOTED_STRING.'|(?:!?!php/const:)?[^ \'"\[\{!].*?)) *\:(( |\t)++(?P<value>.+))?$#u', rtrim($this->currentLine), $values)
204+
self::preg_match('#^(?P<key>(?:![^\s]++\s++)?(?:'.Inline::REGEX_QUOTED_STRING.'|[^ \'"\[\{!].*?)) *\:(( |\t)++(?P<value>.+))?$#u', rtrim($this->currentLine), $values)
205205
&& (!str_contains($values['key'], ' #') || \in_array($values['key'][0], ['"', "'"]))
206206
) {
207207
if ($context && 'sequence' == $context) {

0 commit comments

Comments
 (0)