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] Fix choices defined as Traversable#16796

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
stof merged 1 commit intosymfony:2.8fromnicolas-grekas:fixchoice
Dec 5, 2015

Conversation

@nicolas-grekas
Copy link
Member

QA
Bug fix?yes
New feature?no
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed tickets#16792
LicenseMIT
Doc PR-

@stof
Copy link
Member

stof commentedDec 2, 2015

@nicolas-grekas this still does not fix the case ofnull for types loading choices in a different way (even though they should probably change the default forchoices_as_values in this case, avoiding the issue)

@piogrek
Copy link

@stof thanks for a hint I think that's the simplest way and EntityType already have it. Just found PR from last night (but it needs more thought)symfony/propel1-bridge#1

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

@stof here isnull handling. But should we deprecate accepting thenull value? Otherwise, 3.0 misses a "choices" normalizer also, isn't it?
https://github.com/symfony/symfony/pull/16796/files#diff-11ee91a32c601e8e1d509117556d53b3R400

Copy link
Member

Choose a reason for hiding this comment

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

@nicolas-grekas some sub-types are usingnull as default value of the option to distinguish between passing choices explicitly and using other ways of building choices (using the query builder). This change would break them (the PropelType for instance).
The Doctrine entity type is not affected because it changes thechoices_as_values default and so is not triggered this line of code.

IMO, ifnull is given as input, you should just return it as is here (and letting the validation happening later checking this case in case the subtype does not handle it properly)

@mbabker
Copy link
Contributor

FWIW I ran into the same error condition in#16792 using a combination of the Form component 2.8 and Doctrine bridge 3.0 with the EntityType and this PR fixed the error for that case.

@stof
Copy link
Member

stof commentedDec 5, 2015

👍

1 similar comment
@fabpot
Copy link
Member

👍

@stof
Copy link
Member

stof commentedDec 5, 2015

Thanks for fixing this bug@nicolas-grekas.

@stofstof merged commit021d93a intosymfony:2.8Dec 5, 2015
stof added a commit that referenced this pull requestDec 5, 2015
This PR was merged into the 2.8 branch.Discussion----------[Form] Fix choices defined as Traversable| Q             | A| ------------- | ---| Bug fix?      | yes| New feature?  | no| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets |#16792| License       | MIT| Doc PR        | -Commits-------021d93a [Form] Fix choices defined as Traversable
@nicolas-grekasnicolas-grekas deleted the fixchoice branchDecember 5, 2015 12:00
This was referencedDec 26, 2015
@Tobion
Copy link
Contributor

Shouldn't this have been merged in 2.7? See#17163

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

7 participants

@nicolas-grekas@stof@piogrek@mbabker@fabpot@Tobion@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp