symfony/symfony — pull request #4777 by Burgov (2012-07-07 12:49:27+00:00)
Title: [Form] Output a more usable error when PropertyPath has tried to find ad...

...ders and getters, but failed to find them

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

I've refactored the writeProperty method of propertypath in order to supply a better error message when writing has failed.

The writeProperty method itself now finds singulars (if a singular was not passed) for the private findAdderAndRemover method which allowed for some duplicate code to be removed and since the writeProperty now holds this data, it can provide a more verbose exception message.