From a1e22dc9874c5326041893b9ef306f138e7424c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Dunglas?= Date: Thu, 25 Nov 2021 11:18:20 +0100 Subject: [PATCH] Revert "[DoctrineBridge] add support for the JSON type" This reverts commit 1e218c5a6aa684ea2ebd15b7b6635de5d8af58b9. --- .../Bridge/Doctrine/PropertyInfo/DoctrineExtractor.php | 2 -- .../Doctrine/Tests/PropertyInfo/DoctrineExtractorTest.php | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/Symfony/Bridge/Doctrine/PropertyInfo/DoctrineExtractor.php b/src/Symfony/Bridge/Doctrine/PropertyInfo/DoctrineExtractor.php index 072fa91affa2..879e87979499 100644 --- a/src/Symfony/Bridge/Doctrine/PropertyInfo/DoctrineExtractor.php +++ b/src/Symfony/Bridge/Doctrine/PropertyInfo/DoctrineExtractor.php @@ -189,7 +189,6 @@ public function getTypes($class, $property, array $context = []) case self::$useDeprecatedConstants ? DBALType::TARRAY : Types::ARRAY: // no break case 'json_array': - case 'json': return [new Type(Type::BUILTIN_TYPE_ARRAY, $nullable, null, true)]; case self::$useDeprecatedConstants ? DBALType::SIMPLE_ARRAY : Types::SIMPLE_ARRAY: @@ -317,7 +316,6 @@ private function getPhpType(string $doctrineType): ?string case self::$useDeprecatedConstants ? DBALType::SIMPLE_ARRAY : Types::SIMPLE_ARRAY: // no break case 'json_array': - case 'json': return Type::BUILTIN_TYPE_ARRAY; } diff --git a/src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/DoctrineExtractorTest.php b/src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/DoctrineExtractorTest.php index 71eaf31ca7f8..7e256eb77e2d 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/DoctrineExtractorTest.php +++ b/src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/DoctrineExtractorTest.php @@ -254,11 +254,11 @@ public function typesProvider() new Type(Type::BUILTIN_TYPE_INT), new Type(Type::BUILTIN_TYPE_OBJECT, false, DoctrineRelation::class) )]], - ['json', [new Type(Type::BUILTIN_TYPE_ARRAY, true, null, true)]], + ['json', null], ]; if (class_exists(Types::class)) { - $provider[] = ['json', [new Type(Type::BUILTIN_TYPE_ARRAY, true, null, true)]]; + $provider[] = ['json', null]; } return $provider;