-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Component] [Yaml] [Parser] : can parse with trailing space as 2.8 #22216
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
$yaml = <<<YAML | ||
items: | ||
foo: bar | ||
YAML; |
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.
We should write the fixture this way: $yaml = "items: \n foo: bar";
. Otherwise, someone will save the test file with an editor that strips trailing whitespace which will make the test pretty useless.
'items' => array('foo' => 'bar'), | ||
); | ||
|
||
$this->assertEquals($expected, $this->parser->parse($yaml)); |
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.
let's use assertSame()
@xabbuh good catch, I did the modifications |
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.
👍
Thank you @jordscream. |
…e as 2.8 (jordscream) This PR was merged into the 3.3-dev branch. Discussion ---------- [Component] [Yaml] [Parser] : can parse with trailing space as 2.8 | Q | A | ------------- | --- | Branch? | master | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no <!-- don't forget updating UPGRADE-*.md files --> | Tests pass? | yes | Fixed tickets | #22193 | License | MIT | Doc PR | symfony/symfony-docs Missing rtrim method in line to parse as the version 2.8 does Commits ------- ce3d5ab [Component] [Yaml] [Parser] : can parse with trailing space as 2.8
Missing rtrim method in line to parse as the version 2.8 does