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

[Validator] Assert Valid with many groups#36216

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
xabbuh merged 1 commit intosymfony:3.4fromphucwan91:ticket_36157
Mar 28, 2020

Conversation

@phucwan91
Copy link
Contributor

QA
Branch?3.4
Bug fix?yes
New feature?no
Deprecations?no
TicketsFix#36157
LicenseMIT

Make a reference object get validated by each group when using the Valid constraint with many groups

@nicolas-grekasnicolas-grekas changed the title[Validator] Assert Valid with many groups #36157[Validator] Assert Valid with many groupsMar 26, 2020
if ($constraintinstanceof Composite) {
// instanceof Valid: In case of using a Valid constraint with many groups
// it makes a reference object get validated by each group
if ($constraintinstanceof Composite ||$constraintinstanceof Valid) {
Copy link
Member

Choose a reason for hiding this comment

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

@HeahDude@stof The proposed change is similar to#29499 that we discussed during SymfonyCon Lisbon. To me this looks good but I would like to get your opinion on this too.

Copy link
Contributor

Choose a reason for hiding this comment

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

Indeed, looks good to me too.

xabbuh reacted with thumbs up emoji
@phucwan91
Copy link
ContributorAuthor

FYI, the issue#27257 is completely the same as the current issue (#36157)
so I'm sure this PR can solved the both issues 😁

Copy link
Contributor

@HeahDudeHeahDude left a comment

Choose a reason for hiding this comment

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

Thanks for that PR

if ($constraintinstanceof Composite) {
// instanceof Valid: In case of using a Valid constraint with many groups
// it makes a reference object get validated by each group
if ($constraintinstanceof Composite ||$constraintinstanceof Valid) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Indeed, looks good to me too.

xabbuh reacted with thumbs up emoji
@xabbuh
Copy link
Member

Thank you@phucwan91.

@xabbuhxabbuh merged commit0469be9 intosymfony:3.4Mar 28, 2020
This was referencedMar 30, 2020
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@nicolas-grekasnicolas-grekasnicolas-grekas left review comments

@xabbuhxabbuhxabbuh approved these changes

@stofstofAwaiting requested review from stof

+2 more reviewers

@ogizanagiogizanagiogizanagi approved these changes

@HeahDudeHeahDudeHeahDude approved these changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Projects

None yet

Milestone

3.4

Development

Successfully merging this pull request may close these issues.

6 participants

@phucwan91@xabbuh@nicolas-grekas@ogizanagi@HeahDude@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp