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] [Choice] Fix callback option if not array returned#58615

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

Conversation

@symfonyaml
Copy link
Contributor

QA
Branch?5.4
Bug fix?yes
New feature?no
Deprecations?no
IssuesFix#58610
LicenseMIT

Issue

When using the Choice validatorcallback option, and the callback method provided does not return an array or iterable, it causes a PHP error.
See all details and how to reproduce it in the issue#58610

Solution

In this PR

  • Add some checks if the callback method provided returns an array or iterable
  • Add tests for exception and iterable

NOTE : This PR replacesthe old one(I messed up with the branch rebase)

@carsonbotcarsonbot added this to the5.4 milestoneOct 21, 2024
@carsonbotcarsonbot changed the title[Validator][Choice] Fix callback option if not array or iterable retu…[Validator] [Choice] Fix callback option if not array or iterable retu…Oct 21, 2024
@symfonyamlsymfonyaml changed the title[Validator] [Choice] Fix callback option if not array or iterable retu…[Validator] [Choice] Fix callback option if not arrayOct 22, 2024
@symfonyamlsymfonyaml changed the title[Validator] [Choice] Fix callback option if not array[Validator] [Choice] Fix callback option if not array returnedOct 22, 2024
@nicolas-grekasnicolas-grekasforce-pushed thevalidator-choice-callback-traversable branch from20e6cc9 to02d2769CompareOctober 22, 2024 19:04
@nicolas-grekas
Copy link
Member

Thank you@symfonyaml.

@nicolas-grekasnicolas-grekas merged commit8096a42 intosymfony:5.4Oct 22, 2024
7 of 8 checks passed
This was referencedOct 27, 2024
@symfonyamlsymfonyaml deleted the validator-choice-callback-traversable branchNovember 29, 2024 13:51
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@xabbuhxabbuhxabbuh approved these changes

+1 more reviewer

@ro0NLro0NLro0NL left review comments

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Projects

None yet

Milestone

5.4

Development

Successfully merging this pull request may close these issues.

5 participants

@symfonyaml@nicolas-grekas@ro0NL@xabbuh@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp