-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Validator] Allow multiple atPath() on ConstraintViolationBuilder #36553
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
Don't miss adding some tests please. |
@nicolas-grekas I found out that my changes are breaking tests. First of all, I'll fix them, and then provide new tests for this feature. |
I have added some tests for this feature, so I think this PR is ready to review. |
I am afraid that making this change would be a BC break as it would completely change the current behaviour. To make this more clear I have started to write some tests for the class which should illustrate the current behaviour (see #36584) which to depend on can totally make sense from my point of view. |
@xabbuh when you call ['data.foo', 'data.bar'] and the If we don’t need this behavior, there is another way. Create a new method - |
Well, at least that's the documented behaviour (and we thus cannot change it without breaking BC):
This sentence is part of the docblock of
What I would then find confusing is that calling |
Rereading the linked issue I think a rather simple solution would be to use |
@fabpot there is nothing to do there. I think we can close this PR and related issue. |
Allow multiple
atPath()
inConstraintViolationBuilder
to add multipleConstraintViolation
s at the same time.