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.
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.
Is this correct? If yes, the "and ” in the following paragraph has to be replaced by "or".
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.
Yes, this is correct, see https://github.com/symfony/symfony/blob/2.5/src/Symfony/Component/PropertyAccess/PropertyAccessor.php#L589
If one of them is missing, none is used.
I see 2.3 is throwing exceptions in such cases:
https://github.com/symfony/symfony/blob/2.3/src/Symfony/Component/PropertyAccess/PropertyAccessor.php#L409
but I guess this of behaviour has been considered unneeded as default set* and collection->removeElement are used in case of adder / remover absence.
Also the part "If no
addTag
andremoveTag
method is found, the form will..." is semantically and logically correct.~(p^v) <=> ~p v ~v
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.
Hmm, isn't the bold
and
enough to know this text? If not (readers know things like this better than maintainers), I prefer to add this extra information into the first sentence of this caution. Something along the lines of "You have to create both theaddTag
andremoveTag
methods, otherwise the form will still usesetTag
even ifby_reference
is set tofalse
."