This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
symfony/src/Symfony/Component/Form/Tests
Fabien Potencier c7b226442b merged branch bschussek/issue3732 (PR #3819)
Commits
-------

c4e68a3 [Form] Moved logic of addXxx()/removeXxx() methods to the PropertyPath class

Discussion
----------

[Form] Moved logic of addXxx()/removeXxx() methods to the PropertyPath class

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #3732
Todo: -

![Travis Build Status](https://secure.travis-ci.org/bschussek/symfony.png?branch=issue3732)

The addXxx()/removeXxx() methods should now be called correctly in ChoiceType and CollectionType.

PropertyPath now favors addXxx()/removeXxx() over setXxx() for collections. For example:

```
$propertyPath = new PropertyPath('article.tags');

// Tries to use addTag()/removeTag() and only uses setTags() (et al.)
// if not found
$propertyPath->setValue($article, $tags);
```

For other languages than English or very irregular plurals, a custom singular can be set by separating it with a pipe:

```
$propertyPath = new PropertyPath('article.genera|genus');
```

---------------------------------------------------------------------------

by bschussek at 2012-04-07T12:40:39Z

Again, the failing build is not my fault.
2012-04-10 20:22:54 +02:00
..
Extension merged branch bschussek/issue3732 (PR #3819) 2012-04-10 20:22:54 +02:00
Fixtures [Form] Moved logic of addXxx()/removeXxx() methods to the PropertyPath class 2012-04-08 12:32:17 +02:00
Guess moved component and bridge unit tests to the src/ directory 2012-03-29 08:37:22 +02:00
Util [Form] Moved logic of addXxx()/removeXxx() methods to the PropertyPath class 2012-04-08 12:32:17 +02:00
AbstractDivLayoutTest.php moved component and bridge unit tests to the src/ directory 2012-03-29 08:37:22 +02:00
AbstractExtensionTest.php moved component and bridge unit tests to the src/ directory 2012-03-29 08:37:22 +02:00
AbstractLayoutTest.php merged branch bschussek/issue3839 (PR #3859) 2012-04-10 20:02:12 +02:00
AbstractTableLayoutTest.php moved component and bridge unit tests to the src/ directory 2012-03-29 08:37:22 +02:00
bootstrap.php moved component and bridge unit tests to the src/ directory 2012-03-29 08:37:22 +02:00
FormBuilderTest.php moved component and bridge unit tests to the src/ directory 2012-03-29 08:37:22 +02:00
FormFactoryTest.php moved component and bridge unit tests to the src/ directory 2012-03-29 08:37:22 +02:00
FormInterface.php fixed CS (missing or misplaced license blocks) 2012-04-02 00:52:14 -03:00
FormTest.php moved component and bridge unit tests to the src/ directory 2012-03-29 08:37:22 +02:00