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] remove useless copy in ChoiceType#18316

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
fabpot merged 1 commit intosymfony:2.7fromHeahDude:minor-choice_type-remove_code
Mar 30, 2016

Conversation

@HeahDude
Copy link
Contributor

QA
Branch?2.7+
Bug fix?no
New feature?no
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed ticketsn/a
LicenseMIT
Doc PRsymfony/symfony-docs#6393

ChoiceListFactoryInterface expected$groupBy to be a callable or null, not an array (ref).

The factory defaultsgroupBy toChoiceListInterface::getStructuredValues() (ref).

Hence, the copy of the choices array and the recursive flip are useless and may be slowing down performances imho (especially withEntityType).

`ChoiceListFactoryInterface` expected `$group_by` to be a callable ornull not an array.The factory defaults `group_by` to`ChoiceListInterface::getStructuredValues`.
@HeahDude
Copy link
ContributorAuthor

Note to the merger: sorry for the conflict in 3.0 :/

@Tobion
Copy link
Contributor

👍 Good catch. This piece of code does not seem to have any effect as agroup_by with an array is ignored.

Status: Reviewed

@HeahDude
Copy link
ContributorAuthor

@Tobion thanks for the review :) The effect I'm interested in is a comparison with backfire profiling!

@HeahDude
Copy link
ContributorAuthor

This is due tothis.

@HeahDude
Copy link
ContributorAuthor

Ref thischange in#15061.

@fabpot
Copy link
Member

Thank you@HeahDude.

@fabpotfabpot merged commit562f5e4 intosymfony:2.7Mar 30, 2016
fabpot added a commit that referenced this pull requestMar 30, 2016
This PR was merged into the 2.7 branch.Discussion----------[Form] remove useless copy in ChoiceType| Q             | A| ------------- | ---| Branch?       | 2.7+| Bug fix?      | no| New feature?  | no| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets | n/a| License       | MIT| Doc PR        |symfony/symfony-docs#6393`ChoiceListFactoryInterface` expected `$groupBy` to be a callable or null, not an array ([ref](https://github.com/symfony/symfony/blob/2.7/src/Symfony/Component/Form/ChoiceList/Factory/ChoiceListFactoryInterface.php#L111)).The factory defaults `groupBy` to `ChoiceListInterface::getStructuredValues()` ([ref](https://github.com/symfony/symfony/blob/2.7/src/Symfony/Component/Form/ChoiceList/Factory/DefaultChoiceListFactory.php#L122)).Hence, the copy of the choices array and the recursive flip are useless and may be slowing down performances imho (especially with `EntityType`).Commits-------562f5e4 [Form] remove useless code in ChoiceType
@HeahDudeHeahDude deleted the minor-choice_type-remove_code branchMarch 30, 2016 10:52
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.

5 participants

@HeahDude@Tobion@fabpot@javiereguiluz@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp