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 1246c79b9f bug #30595 Do not validate child constraints if form has no validation groups (maryo)
This PR was merged into the 3.4 branch.

Discussion
----------

Do not validate child constraints if form has no validation groups

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| License       | MIT

If a form has `Valid` constraint and `validation_groups` set to an empty array (to disable validation) then its children were still validated using default validation group because `FormValidator` validated the form data using the empty array validation group here
https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Form/Extension/Validator/Constraints/FormValidator.php#L76

and then `RecursiveContextualValidator` treats the empty array as default validation group here.

https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Validator/Validator/RecursiveContextualValidator.php#L86

Commits
-------

f45f0d03fc [Form] Preventing validation of children if parent with Valid constraint has no validation groups
2019-03-20 13:40:27 +01:00
..
ChoiceList switched array() to [] 2019-01-16 10:39:14 +01:00
Command switched array() to [] 2019-01-16 10:39:14 +01:00
Console/Descriptor switched array() to [] 2019-01-16 10:39:14 +01:00
DependencyInjection replace mocks with real objects in tests 2019-02-07 23:32:19 +01:00
Extension bug #30595 Do not validate child constraints if form has no validation groups (maryo) 2019-03-20 13:40:27 +01:00
Fixtures Apply php-cs-fixer rule for array_key_exists() 2019-02-23 16:06:07 +01:00
Guess switched array() to [] 2019-01-16 10:39:14 +01:00
Resources Enable the fixer enforcing fully-qualified calls for compiler-optimized functions 2018-07-24 12:05:38 +02:00
Util fixed short array CS in comments 2019-01-16 14:27:11 +01:00
AbstractDivLayoutTest.php switched array() to [] 2019-01-16 10:39:14 +01:00
AbstractExtensionTest.php switched array() to [] 2019-01-16 10:39:14 +01:00
AbstractFormTest.php [Form] ensure compatibility with older PHPUnit mocks 2019-01-25 10:38:07 +01:00
AbstractLayoutTest.php allow to skip tests based on the supported version 2019-02-14 15:58:36 +01:00
AbstractRequestHandlerTest.php add back test after fixing it 2019-02-10 22:02:18 +01:00
AbstractTableLayoutTest.php Remove gendered pronouns 2019-01-27 10:04:14 +01:00
ButtonBuilderTest.php switched array() to [] 2019-01-16 10:39:14 +01:00
ButtonTest.php synchronise the form builder docblock 2019-01-22 15:49:00 +01:00
CallbackTransformerTest.php Merge branch '2.8' into 3.2 2017-02-18 18:28:00 +01:00
CompoundFormPerformanceTest.php switched array() to [] 2019-01-16 10:39:14 +01:00
CompoundFormTest.php [Form] ensure compatibility with older PHPUnit mocks 2019-01-25 10:38:07 +01:00
FormBuilderTest.php switched array() to [] 2019-01-16 10:39:14 +01:00
FormConfigTest.php switched array() to [] 2019-01-16 10:39:14 +01:00
FormErrorIteratorTest.php switched array() to [] 2019-01-16 10:39:14 +01:00
FormFactoryBuilderTest.php Merge branch '2.8' into 3.4 2018-07-26 10:45:46 +02:00
FormFactoryTest.php switched array() to [] 2019-01-16 10:39:14 +01:00
FormRegistryTest.php switched array() to [] 2019-01-16 10:39:14 +01:00
FormRendererTest.php Update to PHPUnit namespaces 2017-02-18 08:02:39 -08:00
NativeRequestHandlerTest.php bug #30076 [Form] ignore _method forms in NativeRequestHandler (xabbuh) 2019-02-08 13:09:54 +01:00
ResolvedFormTypeTest.php [Form] ensure compatibility with older PHPUnit mocks 2019-01-25 10:38:07 +01:00
SimpleFormTest.php [Form] ensure compatibility with older PHPUnit mocks 2019-01-25 10:38:07 +01:00
VersionAwareTest.php allow to skip tests based on the supported version 2019-02-14 15:58:36 +01:00