Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
weaverryan merged 1 commit intosymfony:2.0fromClementGautier:2.0
May 26, 2013
Merged

[WIP] Added documentation for GroupSequence#2647

weaverryan merged 1 commit intosymfony:2.0fromClementGautier:2.0
May 26, 2013

Conversation

ClementGautier
Copy link
Contributor

QA
Doc fix?yes
New docs?yes
Applies toall
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

@@ -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`);
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
ContributorAuthor

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

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

@wouterj
Copy link
Member

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

@wouterjwouterj reopened thisMay 20, 2013
@ClementGautier
Copy link
ContributorAuthor

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

@ClementGautier
Copy link
ContributorAuthor

@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

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

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

@ClementGautier
Copy link
ContributorAuthor

Sounds good to me now.

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

use Symfony\Component\Security\Core\User\UserInterface;
use Symfony\Component\Validator\Constraints as Assert;

class User implements UserInterface
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
ContributorAuthor

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

👍

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

@ClementGautier
Copy link
ContributorAuthor

squashed 👍

weaverryan added a commit that referenced this pull requestMay 26, 2013
[WIP] Added documentation for GroupSequence
@weaverryanweaverryan merged commit5676172 intosymfony:2.0May 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 freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

5 participants
@ClementGautier@stof@wouterj@weaverryan@lyrixx

[8]ページ先頭

©2009-2025 Movatter.jp