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
Valid groupSequence seems not to work properly #26205
Comments
Don't know if it's clear what I'm trying to point here, let's be more precise:
At the moment, this is not be possible for several reason: the biggest problem is that we don't have the chance to specify something like Still don't know if this is a bug or a missing feature 🤔 |
If I understand everything correct here, I can conform this bug. This is my non-working example: validation.yaml: App\Model\Outer:
properties:
inner:
- Valid:
groups: [Inner, Complex]
App\Model\Inner:
constraints:
- App\Validator\Constraints\Complex:
groups: [Complex] I want to validate the Call: $validator->validate($outer, null, new GroupSequence(['Inner', 'Complex'])); Result: The The bug is in Solution (more or less a workaround): validation.yaml: App\Model\Outer:
properties:
inner:
- Valid:
groups: [Inner]
- Valid:
groups: [Complex] This is working, because both Valid constraints will have a different hash. |
This is related to #17675 (i.e. both issues are caused by the same cache check in the |
@DonCallisto Can you confirm that #29499 fixes this issue too? |
I think I don't follow here. Can you explain a bit more what you mean? |
@xabbuh Take a look at the code provided. I mean: my expectations were wrong since the moment I've open this issue. |
So there is no bug and we can close here? |
I suppose that we can close |
Thanks for the confirmation. |
Since Symfony 3.4 it is possible to specify
groups
inValid
constraint.Here I provided a working example to prove that
groupSequence
seems not to worworking withValid
groups.Is this a bug or am I missing something here?
To test it, clone the repository and run the command
bin/console app:valid-group-test
The text was updated successfully, but these errors were encountered: