8000 feature #24297 Feature/doctrine type guesser simple json array suppor… · symfony/symfony@2ea27cd · GitHub
[go: up one dir, main page]

Skip to content

Commit 2ea27cd

Browse files
committed
feature #24297 Feature/doctrine type guesser simple json array support (iluuu1994)
This PR was squashed before being merged into the 4.2-dev branch (closes #24297). Discussion ---------- Feature/doctrine type guesser simple json array support Symfony currently supports doctrine/dbal ~2.4 which has support for both `simple_array` and `json_array`: doctrine/dbal@44cd77f doctrine/dbal@2d183ac | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | no | New feature? | yes | BC breaks? | yes | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - There's technically a small BC break since `simple_array` and `json_array` fields would've been displayed as simple text fields. Is this an acceptable BC break for Symfony 3.4? Commits ------- 524bc4b Feature/doctrine type guesser simple json array support
2 parents 8f5229f + 524bc4b commit 2ea27cd

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

src/Symfony/Bridge/Doctrine/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ CHANGELOG
66

77
* deprecated injecting `ClassMetadataFactory` in `DoctrineExtractor`,
88
an instance of `EntityManagerInterface` should be injected instead
9+
* added support for `simple_array` type
910

1011
4.1.0
1112
-----

src/Symfony/Bridge/Doctrine/Form/DoctrineOrmTypeGuesser.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ public function guessType($class, $property)
5353

5454
switch ($metadata->getTypeOfField($property)) {
5555
case Type::TARRAY:
56+
case Type::SIMPLE_ARRAY:
5657
return new TypeGuess('Symfony\Component\Form\Extension\Core\Type\CollectionType', array(), Guess::MEDIUM_CONFIDENCE);
5758
case Type::BOOLEAN:
5859
return new TypeGuess('Symfony\Component\Form\Extension\Core\Type\CheckboxType', array(), Guess::HIGH_CONFIDENCE);

0 commit comments

Comments
 (0)
0