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] Cast choices value callback result to string#49009

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
nicolas-grekas merged 1 commit intosymfony:5.4fromMatth--:fix/values-for-choices
Apr 17, 2023

Conversation

@Matth--
Copy link
Contributor

QA
Branch?5.4
Bug fix?yes
New feature?no
Deprecations?no
TicketsFix#42394
LicenseMIT
Doc PRX

When using "multiple" and "choice_value" callback on a CollectionType or EntityType, the result for the callback needs to be a string. By forcing a string cast, default values will show up in the form view.

@Matth--
Copy link
ContributorAuthor

Not sure what to do about the failing test as theDoctrineChoiceLoader extends from theAbstractLoader located in the Form component.

@stof
Copy link
Member

high-deps will be fixed once the PR is merged up. But low-deps requires a change in the lowest bound of the constraint in the doctrine-bridge

@Matth--
Copy link
ContributorAuthor

@stof I could also remove the test case as it does pretty much the same thing as the one in the Form component. I added it in the first case because I had issues with the EntityType. WDYT?

@Matth--Matth--force-pushed thefix/values-for-choices branch from9b37a6e to11b3b5dCompareMarch 8, 2023 12:32
@Matth--
Copy link
ContributorAuthor

Is there anything I should change for this PR? Or should we find a different solution to this.

Sorry for the tag
@xabbuh

If using "multiple" and "choice_value" on a CollectionType or EntityType, the result for the callback needs to be a string. By forcing a string cast, default values will show up in the form view.
@nicolas-grekas
Copy link
Member

Thank you@Matth--.

@nicolas-grekasnicolas-grekas merged commit887c7b0 intosymfony:5.4Apr 17, 2023
@Matth--Matth-- deleted the fix/values-for-choices branchApril 21, 2023 11:28
This was referencedApr 28, 2023
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@xabbuhxabbuhAwaiting requested review from xabbuhxabbuh is a code owner

@ycerutoycerutoAwaiting requested review from ycerutoyceruto is a code owner

Assignees

No one assigned

Projects

None yet

Milestone

5.4

Development

Successfully merging this pull request may close these issues.

4 participants

@Matth--@stof@nicolas-grekas@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp