Skip to content
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] group_by as callback returns array #30429

Merged
merged 1 commit into from Apr 7, 2019

Conversation

Projects
None yet
7 participants
@antonch1989
Copy link
Contributor

commented Mar 3, 2019

Q A
Branch? master
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #30315
License MIT
Doc PR symfony/symfony-docs#...
@sstok

This comment has been minimized.

Copy link
Contributor

commented Mar 3, 2019

IIRC the form uses the choice value (in the view) to determine which option was selected, if multiple options share the same value it's no longer possible to safely determine which option (in which group) was selected, and the first matching option is selected.

I might be wrong here, but you can verify (without to much hassle) if this works as expected by running an actual form in the web browser, and checking if the correct choice is marked as selected.

Thanks for working on this 👍

@nicolas-grekas nicolas-grekas added this to the next milestone Mar 4, 2019

@antonch1989

This comment has been minimized.

Copy link
Contributor Author

commented Mar 12, 2019

@sstok correct, there is no way to determine which exact choice was picked
abc123
The last one is active, when I create a builder like this $builder = $this->createFormBuilder(['country' => 'DE'])

@antonch1989 antonch1989 force-pushed the antonch1989:issue-30315-form-group-by branch from 8b422db to 4a31587 Mar 19, 2019

@fabpot fabpot force-pushed the antonch1989:issue-30315-form-group-by branch from 4a31587 to 4c04601 Apr 7, 2019

@fabpot

This comment has been minimized.

Copy link
Member

commented Apr 7, 2019

Thank you @antonch1989.

@fabpot fabpot merged commit 4c04601 into symfony:master Apr 7, 2019

1 of 3 checks passed

continuous-integration/appveyor/pr Waiting for AppVeyor build to complete
Details
continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
fabbot.io Your code looks good.
Details

fabpot added a commit that referenced this pull request Apr 7, 2019

feature #30429 [Form] group_by as callback returns array (antonch1989)
This PR was squashed before being merged into the 4.3-dev branch (closes #30429).

Discussion
----------

[Form]  group_by as callback returns array

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #30315
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

Commits
-------

4c04601 [Form]  group_by as callback returns array

@antonch1989 antonch1989 deleted the antonch1989:issue-30315-form-group-by branch Apr 7, 2019

@nicolas-grekas nicolas-grekas modified the milestones: next, 4.3 Apr 30, 2019

@xabbuh xabbuh referenced this pull request May 3, 2019

Closed

remove invalid array type #11516

javiereguiluz added a commit to symfony/symfony-docs that referenced this pull request May 3, 2019

minor #11516 remove invalid array type (xabbuh)
This PR was submitted for the master branch but it was merged into the 3.4 branch instead (closes #11516).

Discussion
----------

remove invalid array type

This is not true before Symfony 4.3 (spotted while looking into how to document symfony/symfony#30429).

Commits
-------

4be9672 remove invalid array type

@fabpot fabpot referenced this pull request May 9, 2019

Merged

Release v4.3.0-BETA1 #31435

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.