-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Validator] fix comparisons with null values at property paths #29839
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
xabbuh
commented
Jan 10, 2019
Q | A |
---|---|
Branch? | 3.4 |
Bug fix? | yes |
New feature? | no |
BC breaks? | no |
Deprecations? | no |
Tests pass? | yes |
Fixed tickets | #29831 |
License | MIT |
Doc PR |
src/Symfony/Component/Validator/Constraints/GreaterThanOrEqualValidator.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/Validator/Constraints/GreaterThanValidator.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/Validator/Constraints/LessThanOrEqualValidator.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/Validator/Constraints/LessThanValidator.php
Outdated
Show resolved
Hide resolved
@xabbuh Can you finish this one? |
I think we need to make a decision first how we see |
@xabbuh I agree that comparing |
? |
@symfony/mergers How do we proceed here? Does a comparison with |
To me null values should be ignored. If any is encountered, we should skip the comparison as it makes no sense. |
Well, this is not about the property the constraint is attached too. But if you compare it to another property that one can be But to make it a bit more clear what I mean: My reasoning would be that a |
Just my two cents because I originally raised the issue (#29831).
But this may not be correct when dealing with the So I think to address this correctly, there needs to be a different handling for the equal/not-equal constraints. But for the less-than/greater-than (-equals) constraints a comparison with |
@sgehrig Yes, that pretty much sums up my thoughts. |
Status: Needs Review |
ping @symfony/mergers |
…aths (xabbuh) This PR was merged into the 3.4 branch. Discussion ---------- [Validator] fix comparisons with null values at property paths | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #29831 | License | MIT | Doc PR | Commits ------- ffa5db7 fix comparisons with null values at property paths