Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

[Yaml Parser] fixed Parser to skip comments when inlining sequences#38040

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
fabpot merged 1 commit intosymfony:4.4fromkorve:37972-iterator-tag-does-not-support-comments
Sep 6, 2020
Merged

[Yaml Parser] fixed Parser to skip comments when inlining sequences#38040

fabpot merged 1 commit intosymfony:4.4fromkorve:37972-iterator-tag-does-not-support-comments
Sep 6, 2020

Conversation

@korve
Copy link
Contributor

@korvekorve commentedSep 2, 2020
edited
Loading

QA
Branch?4.4
Bug fix?yes
New feature?no
Deprecations?no
TicketsFix#37972
LicenseMIT

The parser didn't skip comments when parsing values in a sequence. This resulted in the YamlFileLoader trying to
parse a comment as a IteratorArgument which resulted in a InvalidArgumentException.

Consider the following valid yaml:

-!foo[bar,#baz]

The parser would generate the following array:

['bar','#baz']

After this fix the parser will generate the following array:

['bar']

This bug only appeared for me in 4.4

Copy link
Member

@nicolas-grekasnicolas-grekas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Thanks for having a look and submitting.

]]
YAML
],
'with-comments-trailing-comma' => [
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I fail to see how this test case differs from the previous one.

Copy link
ContributorAuthor

@korvekorveSep 6, 2020
edited
Loading

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Oops you're right. The 'with-comments' was meant to be without a comma after the 2nd array element. I've fixed it.

xabbuh reacted with thumbs up emoji
@fabpotfabpot added the Yaml labelSep 6, 2020
@fabpot
Copy link
Member

Thank you@korve.

korve reacted with thumbs up emoji

@fabpotfabpot merged commitf0bf853 intosymfony:4.4Sep 6, 2020
This was referencedSep 27, 2020
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@nicolas-grekasnicolas-grekasnicolas-grekas left review comments

@xabbuhxabbuhxabbuh approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

4.4

Development

Successfully merging this pull request may close these issues.

5 participants

@korve@fabpot@nicolas-grekas@xabbuh@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp