Feature/doctrine type guesser simple json array support

This commit is contained in:
Ilija Tovilo 2017-09-23 12:05:37 +02:00 committed by Fabien Potencier
parent 8f5229f768
commit 524bc4b039
2 changed files with 2 additions and 0 deletions

View File

@ -6,6 +6,7 @@ CHANGELOG
* deprecated injecting `ClassMetadataFactory` in `DoctrineExtractor`,
an instance of `EntityManagerInterface` should be injected instead
* added support for `simple_array` type
4.1.0
-----

View File

@ -53,6 +53,7 @@ class DoctrineOrmTypeGuesser implements FormTypeGuesserInterface
switch ($metadata->getTypeOfField($property)) {
case Type::TARRAY:
case Type::SIMPLE_ARRAY:
return new TypeGuess('Symfony\Component\Form\Extension\Core\Type\CollectionType', array(), Guess::MEDIUM_CONFIDENCE);
case Type::BOOLEAN:
return new TypeGuess('Symfony\Component\Form\Extension\Core\Type\CheckboxType', array(), Guess::HIGH_CONFIDENCE);