Skip to content

Conversation

@ClementGautier
Copy link
Contributor

Q A
Doc fix? yes
New docs? yes
Applies to all
Fixed tickets #1248

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

Copy link
Member

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

Copy link
Contributor Author

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 ?

@stof
Copy link
Member

stof commented May 20, 2013

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 Symfony\Component\Validator\GroupSequenceProviderInterface in your model and mapping your class with @Assert\GroupSequenceProvider

@wouterj
Copy link
Member

wouterj commented May 20, 2013

Thanks for starting on this one! Could you please include the pull request format? This fixes issue #1248

@wouterj wouterj closed this May 20, 2013
@wouterj wouterj reopened this May 20, 2013
@ClementGautier
Copy link
Contributor Author

Thanks @stof and @wouterj I will update the PR in few hours

@ClementGautier
Copy link
Contributor Author

@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 ?

@stof
Copy link
Member

stof commented May 20, 2013

@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.

@ClementGautier
Copy link
Contributor Author

@stof I will find a smart use case of GroupSequenceProvider latter and make an other PR.

@ClementGautier
Copy link
Contributor Author

Sounds good to me now.

@stof / @bschussek / @wouterj : Is it ok for you ?

Copy link
Member

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 ;)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed. Thx

@wouterj
Copy link
Member

wouterj commented May 20, 2013

👍

(if you know how to do it, could you please squash the commits?)

@ClementGautier
Copy link
Contributor Author

squashed 👍

weaverryan added a commit that referenced this pull request May 26, 2013
[WIP] Added documentation for GroupSequence
@weaverryan weaverryan merged commit 5676172 into symfony:2.0 May 26, 2013
@weaverryan
Copy link
Member

Hi Clement!

Very nice addition! I've merged this in with only minor changes. I've also opened issue #2664 as a placeholder for @stof's suggestion.

Thanks everyone!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants