Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[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
[Yaml Parser] fixed Parser to skip comments when inlining sequences#38040
Uh oh!
There was an error while loading.Please reload this page.
Conversation
nicolas-grekas left a comment
There was a problem hiding this 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.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services9.yml OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
| ]] | ||
| YAML | ||
| ], | ||
| 'with-comments-trailing-comma' => [ |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
fabpot commentedSep 6, 2020
Thank you@korve. |
Uh oh!
There was an error while loading.Please reload this page.
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:
The parser would generate the following array:
After this fix the parser will generate the following array:
['bar']This bug only appeared for me in 4.4