-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
[WIP] Added documentation for GroupSequence #2647
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
@@ -771,6 +771,9 @@ With this configuration, there are two validation groups: | |||
|
|||
* ``Default`` - contains the constraints not assigned to any other group; | |||
|
|||
* ``User`` - contains the constraints that belongs to group ``Default`` | |||
(this group is usefull for :ref:`book-validation-group-sequence`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is wrong. It does not correspond to the example
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why ? The entity class in the example is User so the validation group is named User right ?
you should also document the other way to use group sequences: instead of having a static sequence in the annotation, you can have a dynamic sequence by implementing |
Thanks for starting on this one! Could you please include the pull request format? This fixes issue #1248 |
@stof I will not document GroupSequenceProvider in this PR as I don't know how it work and when it was added (I think it is a 2.1 feature right ?). Can you make a PR for it when you have time ? |
@ClementGautier No, it is also a 2.0 feature. The only difference is that the array of group is returned by a method (and so can be build based on some logic) instead of being hardcoded. |
@stof I will find a smart use case of GroupSequenceProvider latter and make an other PR. |
use Symfony\Component\Security\Core\User\UserInterface; | ||
use Symfony\Component\Validator\Constraints as Assert; | ||
|
||
class User implements UserInterface |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You miss the GroupSequence here ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed. Thx
👍 (if you know how to do it, could you please squash the commits?) |
squashed 👍 |
[WIP] Added documentation for GroupSequence
The GroupSequence feature has never been documented.
@bschussek Can you review this ? You made an explanation on this topic about this feature: http://stackoverflow.com/questions/9996618/symfony2-dependency-between-validation-asserts