Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Serializer] Added a test for decoding xml with whitespaces #11233

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
Jul 4, 2014

Conversation

florianv
Copy link
Contributor

Q A
Bug fix? no
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets
License MIT
Doc PR

The PR 466a3d7 introduced a BC break because white spaces were previously decoded as text nodes.

So this PR reverts it and adds a context option to configure it.

@fabpot
Copy link
Member

fabpot commented Jun 26, 2014

This should probably be done in the branch where the BC was introduced.

Edited: looks like it's only in master.

$this->assertEquals($expected, $this->encoder->decode($xml, 'xml'));
$this->assertEquals(
$expected,
$this->encoder->decode($xml, 'xml', array('xml_decode_ignore_white_space' => true))
Copy link
Member

Choose a reason for hiding this comment

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

if you require passign an option to achieve the same result, it is not BC

@stof
Copy link
Member

stof commented Jun 26, 2014

The commit 466a3d7 was reverting a BC break

@stof
Copy link
Member

stof commented Jun 26, 2014

so I'm -1 for this pR, at least in its current form. It implements a new feature, but reintroduces the previous BC break by default

@florianv florianv changed the title [Serializer] Added option to ignore white spaces when decoding xml [Serializer] Added a test for decoding xml with whitespaces Jun 26, 2014
@florianv
Copy link
Contributor Author

I missed the fact that 466a3d7 reverted a BC break. Whitespaces were previously ignored so it works as intended.

I've kept the test because none of them contains whitespaces despite the Cdata one (which was part of the confusion).

@stof
Copy link
Member

stof commented Jul 3, 2014

👍 now that it only adds an extra test

@fabpot
Copy link
Member

fabpot commented Jul 4, 2014

👍

@fabpot
Copy link
Member

fabpot commented Jul 4, 2014

Thank you @florianv.

@fabpot fabpot merged commit f5bf45e into symfony:master Jul 4, 2014
fabpot added a commit that referenced this pull request Jul 4, 2014
…ces (florianv)

This PR was merged into the 2.6-dev branch.

Discussion
----------

[Serializer] Added a test for decoding xml with whitespaces

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        |

The PR 466a3d7 introduced a BC break because white spaces were previously decoded as text nodes.

So this PR reverts it and adds a context option to configure it.

Commits
-------

f5bf45e [Serializer] Added a test for decoding xml with whitespaces
@florianv florianv deleted the xml-decode-ws branch July 5, 2014 14:41
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.

3 participants