@@ -125,6 +125,11 @@ class ValidatorTypeGuesser implements FormTypeGuesserInterface
}
break;
case 'Symfony\Component\Validator\Constraints\Choice':
+ if (!$constraint->choices) {
+ // choices probably defined as a callback
+ break;
+ }
+
return new TypeGuess(
'choice',
array('choices' => $constraint->choices),