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/tests/Symfony/Tests/Component/Form
Fabien Potencier 7ea9c5b92a merged branch stloyd/missingClientTransformer (PR #2421)
Commits
-------

49d2685 [Form] Add default validation to TextType field (and related)

Discussion
----------

[Form] Add default transformer to TextType field (and related)

Bug fix: yes&no (?)
Feature addition: yes (?)
BC break: no
Symfony2 tests pass: yes
Fixes the following tickets: #1962.

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

by stloyd at 2011/12/19 03:43:37 -0800

@fabpot ping ;-)

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

by fabpot at 2011/12/19 10:58:20 -0800

Is it really needed? I have a feeling that it enforces unneeded constraints, but I can be wrong of course.

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

by hlecorche at 2011/12/20 02:31:03 -0800

It's needed because with TextType field, and without the ValueToStringTransformer, the user data (when sending the form) can be an array !!!

For example:
- if there is a TextType field
- and if there is a MaxLengthValidator
- and if the user data (when sending the form) is an array
So the exception "Expected argument of type string, array given in src\Symfony\Component\Validator\Constraints\MaxLengthValidator.php at line 40" is thrown
2011-12-21 12:55:51 +01:00
..
Extension merged branch stloyd/missingClientTransformer (PR #2421) 2011-12-21 12:55:51 +01:00
Fixtures [Form] Reverted PR #1758. 2011-07-22 16:42:50 +02:00
Guess fixed CS 2011-06-08 19:56:59 +02:00
Util [Form] Simplified a bit FormUtil and extended test coverage 2011-10-07 12:04:26 +02:00
AbstractDivLayoutTest.php [Form] reverted partially previous commit 2011-09-24 16:42:12 +02:00
AbstractExtensionTest.php merged 2.0 2011-10-29 12:01:39 +02:00
AbstractLayoutTest.php [Form] added some unit tests 2011-11-22 10:31:25 +01:00
AbstractTableLayoutTest.php Rebased with master, and fixed wrong behavior with proper tests coverage 2011-09-24 10:44:47 +02:00
FormBuilderTest.php removed unused use statements 2011-11-24 07:16:14 +01:00
FormFactoryTest.php merged 2.0 2011-12-13 16:12:53 +01:00
FormInterface.php fixed CS 2011-06-08 19:56:59 +02:00
FormTest.php [Form] added tests for previous merge 2011-09-27 10:12:54 +02:00
PropertyPathTest.php [Tests] Use proper phpunit assertion functions: "assertTrue", "assertFalse", "assertNull" 2011-08-25 15:41:15 +02:00