10000 [Form] Fixed expanded choice field to be marked invalid when unknown choices are submitted by webmozart · Pull Request #7940 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[Form] Fixed expanded choice field to be marked invalid when unknown choices are submitted #7940

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

Merged
merged 6 commits into from
Sep 10, 2013

Conversation

webmozart
Copy link
Contributor

#7939 must be merged before this PR is merged.

Q A
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #5113, #5190
License MIT
Doc PR -

TODO:

  • test EntityChoiceList for stricter rules
  • test ModelChoiceList for stricter rules
  • remove/deprecate the ChoiceList::getIndicesFor*() methods

@fabpot
Copy link
Member
fabpot commented May 6, 2013

#7939 has been merged now.

@gnutix
Copy link
Contributor
gnutix commented Jun 30, 2013

@bschussek Is there any help we could bring for this to get merged ?

@caponica
Copy link
Contributor

@bscussek - anything more that can be done to get this one merged?

@webmozart
Copy link
Contributor Author

I finished this PR now. I did not improve the test coverage of ModelChoiceList since currently none of our Propel tests uses a temporary database, which is needed here, but I don't know how to set it up. I propose to merge this PR as is and improve the ModelChoiceList test suite later on in cooperation with the propel guys. /cc @willdurand

@fabpot
Copy link
Member
fabpot commented Sep 10, 2013

If this is a but fix with no BC beaks, this PR should be merged into 2.2, right?

@webmozart
Copy link
Contributor Author

I'll check whether this is possible

@webmozart
Copy link
Contributor Author

Ok, here are three versions now:

fabpot added a commit that referenced this pull request Sep 10, 2013
This PR was merged into the 2.2 branch.

Discussion
----------

[2.2][Form] Fixed expanded choice field to be marked invalid when unknown choices are submitted

Same as #7940, rebased onto 2.2.

Commits
-------

4d2dc55 [DoctrineBridge] Improved test coverage of EntityChoiceList
9d3628c [Form] Improved test coverage of ChoiceList classes
ed83752 [Form] Fixed expanded choice field to be marked invalid when unknown choices are submitted
30aa1de [Form] Fixed ChoiceList::get*By*() methods to preserve order and array keys
53f292a [Form] Removed usage of the ChoiceList::getIndicesFor*() methods where they don't offer any performance benefit
fabpot added a commit that referenced this pull request Sep 10, 2013
This PR was merged into the 2.3 branch.

Discussion
----------

[2.3][Form] Fixed expanded choice field to be marked invalid when unknown choices are submitted

Same as #7940, rebased onto 2.3.

Commits
-------

7879f07 [DoctrineBridge] Improved test coverage of EntityChoiceList
58e7c10 [Form] Improved test coverage of ChoiceList classes
9542d72 [Form] Fixed expanded choice field to be marked invalid when unknown choices are submitted
72b8807 [Form] Fixed ChoiceList::get*By*() methods to preserve order and array keys
e1bf07f [Form] Removed usage of the ChoiceList::getIndicesFor*() methods where they don't offer any performance benefit
fabpot added a commit that referenced this pull request Sep 10, 2013
This PR was merged into the master branch.

Discussion
----------

[Form] Fixed expanded choice field to be marked invalid when unknown choices are submitted

#7939 must be merged before this PR is merged.

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #5113, #5190
| License       | MIT
| Doc PR        | -

TODO:

- [x] test EntityChoiceList for stricter rules
- [ ] test ModelChoiceList for stricter rules
- [x] remove/deprecate the ChoiceList::getIndicesFor*() methods

Commits
-------

9efdb8e [Form] Deprecated ChoiceList::getIndicesFor*() methods
67ba131 [DoctrineBridge] Improved test coverage of EntityChoiceList
31e5ce5 [Form] Improved test coverage of ChoiceList classes
6283b0e [Form] Fixed expanded choice field to be marked invalid when unknown choices are submitted
79a214f [Form] Fixed ChoiceList::get*By*() methods to preserve order and array keys
62fbed6 [Form] Removed usage of the ChoiceList::getIndicesFor*() methods where they don't offer any performance benefit
@fabpot fabpot merged commit 9efdb8e into symfony:master Sep 10, 2013
@willdurand
Copy link
Contributor

ok, I thought I was able to write some tests for Propel, but I must admit I need some more pointers. What should I test?

@webmozart
Copy link
Contributor Author

Basically all the _EntityChoiceList_Test.php tests should be ported 1:1 to
Propel. Probably the one major difference will be the setup code of the
tests, everything else will probably be very similar.

@willdurand
Copy link
Contributor

Alright, I'll try to come up with something.

jakzal added a commit to jakzal/symfony that referenced this pull request Sep 24, 2013
fabpot added a commit that referenced this pull request Sep 24, 2013
This PR was merged into the 2.2 branch.

Discussion
----------

Fixed an entity class name in a benchmark test

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

Broken in #7940 (67ba131). Since benchmark tests are not run on travis, it didn't complain.

Commits
-------

50ff35a Fixed an entity class name.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants
0