8000 [Component] [Yaml] [Parser] : can parse with trailing space as 2.8 by jsamouh · Pull Request #22216 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[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

Merged
merged 1 commit into from
Mar 31, 2017

Conversation

jsamouh
Copy link
Contributor
@jsamouh jsamouh commented Mar 29, 2017
Q A
Branch? master
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
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

$yaml = <<<YAML
items:
foo: bar
YAML;
Copy link
Member

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));
Copy link
Member

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 xabbuh added this to the 3.3 milestone Mar 29, 2017
@jsamouh
Copy link
Contributor Author
jsamouh commented Mar 30, 2017

@xabbuh good catch, I did the modifications

Copy link
Member
@xabbuh xabbuh left a comment

Choose a reason for hiding this comment

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

👍

@fabpot
Copy link
Member
fabpot commented Mar 31, 2017

Thank you @jordscream.

@fabpot fabpot merged commit ce3d5ab into symfony:master Mar 31, 2017
fabpot added a commit that referenced this pull request Mar 31, 2017
…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
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
0