Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[Yaml] Allow trailing newlines after the end-of-document marker#64316

Merged
nicolas-grekas merged 1 commit into
symfony:5.4symfony/symfony:5.4from
nicolas-grekas:yaml-fixnicolas-grekas/symfony:yaml-fixCopy head branch name to clipboard
May 21, 2026
Merged

[Yaml] Allow trailing newlines after the end-of-document marker#64316
nicolas-grekas merged 1 commit into
symfony:5.4symfony/symfony:5.4from
nicolas-grekas:yaml-fixnicolas-grekas/symfony:yaml-fixCopy head branch name to clipboard

Conversation

@nicolas-grekas
Copy link
Copy Markdown
Member

@nicolas-grekas nicolas-grekas commented May 20, 2026

Q A
Branch? 5.4
Bug fix? yes
New feature? no
Deprecations? no
Issues Fix #64313
License MIT

The hardened #\.\.\.[ \t]*+$# regex introduced in 9749cd4 only accepts horizontal whitespace after the ... end-of-document marker, so a document ending with a blank line after ... is no longer stripped and the parser errors on the leftover marker. Restore the previous tolerance using \s*+$; the possessive quantifier keeps the pattern safe from catastrophic backtracking since nothing follows it.

The hardened `#\.\.\.[ \t]*+$#` regex introduced in 9749cd4 only
accepts horizontal whitespace after `...`, so a YAML document ending
with the marker followed by a blank line is no longer stripped and the
parser errors on the leftover `...`. Restore the previous tolerance for
any trailing whitespace by using `\s*+$`; the possessive quantifier
keeps the pattern safe from catastrophic backtracking.
@carsonbot
Copy link
Copy Markdown

Hey!

Oh no, it looks like you have made this PR towards a branch that is not maintained anymore. :/
Could you update the PR base branch to target one of these branches instead? 6.4, 7.4, 8.0, 8.1.

Cheers!

Carsonbot

@nicolas-grekas nicolas-grekas merged commit 44cf082 into symfony:5.4 May 21, 2026
0 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.