[Form] removed guesser for Choice constraints
The guesser has been removed as the constraints only knows about the valid keys. But to be able to create the Type automatically, we also need the values.
This commit is contained in:
parent
d49eaa6a41
commit
47da6cf39e
@ -9,6 +9,9 @@ timeline closely anyway.
|
||||
RC4 to RC5
|
||||
----------
|
||||
|
||||
* Removed the guesser for the Choice constraint as the constraint only knows
|
||||
about the valid keys, and not their values.
|
||||
|
||||
* To avoid security issues, HTTP headers coming from proxies are not trusted
|
||||
anymore by default (like `HTTP_X_FORWARDED_FOR`, `X_FORWARDED_PROTO`, and
|
||||
`X_FORWARDED_HOST`). If your application is behind a reverse proxy, add the
|
||||
|
@ -124,17 +124,6 @@ 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),
|
||||
Guess::HIGH_CONFIDENCE
|
||||
);
|
||||
case 'Symfony\Component\Validator\Constraints\Country':
|
||||
return new TypeGuess(
|
||||
'country',
|
||||
|
Reference in New Issue
Block a user