8000 [Validator] fixed Boolean handling in XML constraint mappings by fabpot · Pull Request #8831 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[Validator] fixed Boolean handling in XML constraint mappings #8831

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
Aug 24, 2013

Conversation

fabpot
Copy link
Member
@fabpot fabpot commented Aug 22, 2013
Q A
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #5603
License MIT
Doc PR n/a

ping @bschussek

@webmozart
Copy link
Contributor

Does the phpize() method do trimming as well? Could you please add a test case that tests that values are trimmed?

@fabpot
Copy link
Member Author
fabpot commented Aug 22, 2013

@bschussek fixed ;)

@@ -166,7 +166,7 @@ protected function parseOptions(\SimpleXMLElement $nodes)
$value = array();
}
} else {
$value = trim($node);
$value = trim(XmlUtils::phpize($node));
Copy link
Contributor

Choose a reason for hiding this comment

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

I think you should test whether the value is a string before applying trim(), otherwise values will be converted back to strings.

Copy link
Member Author

Choose a reason for hiding this comment

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

Indeed, I was fooled by the usage of assertEquals. Everything should be ok now.

fabpot added a commit that referenced this pull request Aug 24, 2013
This PR was merged into the 2.2 branch.

Discussion
----------

[Validator] fixed Boolean handling in XML constraint mappings

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

ping @bschussek

Commits
-------

33b0a17 [Validator] fixed Boolean handling in XML constraint mappings (closes #5603)
@fabpot fabpot merged commit 33b0a17 into symfony:2.2 Aug 24, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0