-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Form] Fixed edge cases in MergeCollectionListener #3256
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
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…f Reflection to avoid problems when using class hierarchies
Wait a minute before merging this. |
…ver_prefix" to "add_method" and "remove_method" and allowed to specify full method names
@fabpot Ready to merge |
// Any of the two methods is required, but not yet known | ||
if ($addMethodNeeded || $removeMethodNeeded) { | ||
$plural = ucfirst($form->getName()); | ||
$singulars = (array) FormUtil::singularify($plural); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no need for local variable $plural
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
fabpot
added a commit
that referenced
this pull request
Feb 2, 2012
Commits ------- 8714d79 [Form] Simplified code in MergeCollectionListener 8ab982a [Form] Fixed: Custom add and remove method are not invoked if disallowed 02f61ad [Form] Renamed choice and collection options "adder_prefix" and "remover_prefix" to "add_method" and "remove_method" and allowed to specify full method names b393774 [Form] Used direct method access in MergeCollectionListener instead of Reflection to avoid problems when using class hierarchies d208f4e [Form] Made it possible to use models with only either addXxx() or removeXxx() Discussion ---------- [Form] Fixed edge cases in MergeCollectionListener Bug fix: yes Feature addition: no Backwards compatibility break: no Symfony2 tests pass: yes Fixes the following tickets: - Todo: -  Fixes an issue mentioned in the comments of #3239 see #3239 (comment) --------------------------------------------------------------------------- by bschussek at 2012-02-02T12:12:17Z Wait a minute before merging this. --------------------------------------------------------------------------- by bschussek at 2012-02-02T13:01:55Z @fabpot Ready to merge
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: -
Todo: -
Fixes an issue mentioned in the comments of #3239
see #3239 (comment)