symfony/symfony — pull request #4666 by Inori (2012-06-26 18:39:29+00:00)
Title: [Form] [Validator] added a check for constraints option actually being present

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes

I'm not sure exactly for reasons but sometimes when trying to bind a form with custom fields the `constraints` option is null, which means that whole application crashes with the `wrong argument supplied for foreach...` error.

Example would be https://github.com/Inori/LexikFormFilterBundle/blob/master/Filter/Extension/Type/ChoiceFilterType.php which is a relatively simple extension of `ChoiceType` and doesn't override it's default options...