-
-
Notifications
You must be signed in to change notification settings - Fork 907
Support GroupSequence and callable for validation groups #254
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
Support GroupSequence and callable for validation groups #254
Conversation
e0454db
to
33a5a13
Compare
👍 |
Can you add a test? |
Can you also rebase against 1.0? |
So the current 1.0 is actually an old stable version? Can I just continue targeting 2.0 then? (Since that's what I'm using...) |
a2704e8
to
99253e8
Compare
Yes it looks fine to me to target 2.0 for this feature. |
99253e8
to
c08b582
Compare
Added unit test :) |
But @dunglas I suspect my changes here might have potentially broken some of the metadata (caching?) codes... Any guidance on that? See Scrutinizer issues... Currently I've only added a workaround at https://github.com/teohhanhui/DunglasApiBundle/blob/c08b582bc7742bd755883f9dc87d91cfde93ae46/Mapping/Loader/ValidatorMetadataLoader.php#L68-L70 (not sure what are the consequences of that) |
It's not important because, anyway, the metadata system will be entirely refactored to use the new Symfony PropertyInfo Component. |
ping @sroze @theofidry |
Looks good to me. |
c08b582
to
14fb83b
Compare
Support GroupSequence and callable for validation groups
Thank you @teohhanhui! |
Continuing from #250...
I've found out that group sequence providers do not handle cascade well:
symfony/symfony#3622
symfony/symfony#9650
symfony/symfony#11880
symfony/symfony#15666
According to JSR303:
(Also see Example 3.12 under the same section)
So a callback to determine the validation groups seems to be the solution...