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

[Form] group constraints when calling the validator#34464

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

Conversation

@nicolas-grekas
Copy link
Member

QA
Branch?4.4
Bug fix?yes
New feature?no
Deprecations?no
Tickets-
LicenseMIT
Doc PR-

Follow up of#34081
Spotted during the workshop at SymfonyCon, while trying to fix deprecation notices on symfony-demo:
the Form component currently passes constraints one by one for validation, effectively preventing the validator from taking care of cross-constraints dependencies.

This PR fixes it.

This will prevent ppl from having to fix things like

Using the "Symfony\Component\Validator\Constraints\Length" constraint with the "min" option without setting the "allowEmptyString" one is deprecated and defaults to true. In 5.0, it will become optional and default to false.

@nicolas-grekasnicolas-grekas added this to the4.4 milestoneNov 20, 2019
@nicolas-grekasnicolas-grekas changed the title[Form] group contraints when calling the validator[Form] group constraints when calling the validatorNov 20, 2019
}
}

foreach ($groupedConstraintsas$group =>$constraint) {
Copy link
Contributor

Choose a reason for hiding this comment

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

- constraint+ constraints

?

Copy link
Member

Choose a reason for hiding this comment

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

That would override the$constraints variable used above.

Copy link
Contributor

@dmaicherdmaicherNov 20, 2019
edited
Loading

Choose a reason for hiding this comment

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

Maybe name it$constraintsInGroup or so? Slightly confusing otherwise 🙈

nicolas-grekas added a commit that referenced this pull requestNov 21, 2019
…as-grekas)This PR was merged into the 4.4 branch.Discussion----------[Form] group constraints when calling the validator| Q             | A| ------------- | ---| Branch?       | 4.4| Bug fix?      | yes| New feature?  | no| Deprecations? | no| Tickets       | -| License       | MIT| Doc PR        | -Follow up of#34081Spotted during the workshop at SymfonyCon, while trying to fix deprecation notices on symfony-demo:the Form component currently passes constraints one by one for validation, effectively preventing the validator from taking care of cross-constraints dependencies.This PR fixes it.This will prevent ppl from having to fix things like> Using the "Symfony\Component\Validator\Constraints\Length" constraint with the "min" option without setting the "allowEmptyString" one is deprecated and defaults to true. In 5.0, it will become optional and default to false.Commits-------d15f77f [Form] group constraints when calling the validator
@nicolas-grekasnicolas-grekas merged commitd15f77f intosymfony:4.4Nov 21, 2019
This was referencedNov 21, 2019
@nicolas-grekasnicolas-grekas deleted the form-group-constraints branchNovember 26, 2019 10:23
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@xabbuhxabbuhxabbuh approved these changes

+2 more reviewers

@dmaicherdmaicherdmaicher left review comments

@ogizanagiogizanagiogizanagi approved these changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Projects

None yet

Milestone

4.4

Development

Successfully merging this pull request may close these issues.

5 participants

@nicolas-grekas@dmaicher@xabbuh@ogizanagi@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp