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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Form] Refactor DefaultChoiceListFactory #29731

Open
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
3 participants
@vudaltsov
Copy link
Contributor

vudaltsov commented Dec 30, 2018

Q A
Branch? master
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets n/a
License MIT
Doc PR n/a

In this PR I refactored a really messy DefaultChoiceListFactory code.
Ping @HeahDude, @xabbuh.

@vudaltsov vudaltsov force-pushed the vudaltsov:choice-list-view-builder branch 2 times, most recently from 84ba7b0 to 4abdb3d Dec 31, 2018

@vudaltsov

This comment has been minimized.

Copy link
Contributor

vudaltsov commented Dec 31, 2018

Blackfire comparison for a form with 3 different choices.

image

So, it became slower a bit because of increased number of method calls basically. Is it too much for a DX improvement?

@nicolas-grekas nicolas-grekas added this to the next milestone Jan 3, 2019

fabpot added a commit that referenced this pull request Jan 4, 2019

minor #29769 [Form] Fix FormDefaultChoiceListFactory test (vudaltsov)
This PR was merged into the 3.4 branch.

Discussion
----------

[Form] Fix FormDefaultChoiceListFactory test

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #29731 (review)
| License       | MIT
| Doc PR        | n/a

`$groupBy` is either `null` or `callable`. Passing `array()` is wrong.

Commits
-------

b8f6390 Fixed groupBy argument value in DefaultChoiceListFactoryTest

@vudaltsov vudaltsov force-pushed the vudaltsov:choice-list-view-builder branch from 4abdb3d to 8e71c9f Jan 5, 2019

@vudaltsov

This comment has been minimized.

Copy link
Contributor

vudaltsov commented Jan 5, 2019

Rebased

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