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] Fix ValidValidator group cascading usage#33834

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

@fancyweb
Copy link
Contributor

@fancywebfancyweb commentedOct 3, 2019
edited
Loading

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

$this->context->getGroup() returnsstring ornull.

ContextualValidatorInterface::validate() 3rd argument accepts an array but it must not containnull (its contract doesn't allow it). If it does, it will fail inRecursiveContextualValidator::validateInGroup() for example because of thestring scalar type on the$group argument. (on 4.4)

Note that in our "common" usage of theValid constraint, the group in its validator will never benull because this constraint has a special treatment. However, if this validator is reused in a custom way, it can fail.

@xabbuh
Copy link
Member

Thank you@fancyweb.

xabbuh added a commit that referenced this pull requestOct 7, 2019
…yweb)This PR was merged into the 3.4 branch.Discussion----------[Validator] Fix ValidValidator group cascading usage| Q             | A| ------------- | ---| Branch?       | 3.4| Bug fix?      | yes| New feature?  | no| Deprecations? | no| Tickets       | -| License       | MIT| Doc PR        | -`$this->context->getGroup()` returns `string` or `null`.`ContextualValidatorInterface::validate()` 3rd argument accepts an array but it must not contain `null` (its contract doesn't allow it). If it does, it will fail in `RecursiveContextualValidator::validateInGroup()` for example because of the `string` scalar type on the `$group` argument. (on 4.4)Note that in our "common" usage of the `Valid` constraint, the group in its validator will never be `null` because this constraint has a special treatment. However, if this validator is reused in a custom way, it can fail.Commits-------72684b0 [Validator] Fix ValidValidator group cascading usage
@xabbuhxabbuh merged commit72684b0 intosymfony:3.4Oct 7, 2019
@fancywebfancyweb deleted the validator-valid-validator-group branchOctober 7, 2019 09:40
This was referencedOct 7, 2019
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@nicolas-grekasnicolas-grekasnicolas-grekas approved these changes

@xabbuhxabbuhxabbuh approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

3.4

Development

Successfully merging this pull request may close these issues.

4 participants

@fancyweb@xabbuh@nicolas-grekas@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp