Skip to content

Commit 4c0d8d1

Browse files
Merge branch '5.3' into 5.4
* 5.3: Fix tests on PHP 8.1 [Cache] Fix memory leak [DependencyInjection] fix inlining when non-shared services are involved [DoctrineBridge] add support for the JSON type [PHPUnitBridge] Fix Uncaught ValueError [FrameworkBundle] fix registering late resettable services [Validator] Missing translations for Greek (el) translate for japanese 101,102,103 [HttpClient] Curl http client has to reinit curl multi handle on reset [Validator] Add Swedish translation for issue #43737
2 parents 0fcfb6a + 9b220eb commit 4c0d8d1

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

PropertyInfo/DoctrineExtractor.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,7 @@ public function getTypes(string $class, string $property, array $context = [])
168168
switch ($typeOfField) {
169169
case Types::ARRAY:
170170
case 'json_array':
171+
case 'json':
171172
return [new Type(Type::BUILTIN_TYPE_ARRAY, $nullable, null, true)];
172173

173174
case Types::SIMPLE_ARRAY:
@@ -282,6 +283,7 @@ private function getPhpType(string $doctrineType): ?string
282283
case Types::ARRAY:
283284
case Types::SIMPLE_ARRAY:
284285
case 'json_array':
286+
case 'json':
285287
return Type::BUILTIN_TYPE_ARRAY;
286288
}
287289

Tests/PropertyInfo/DoctrineExtractorTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ public function typesProvider()
207207
new Type(Type::BUILTIN_TYPE_INT),
208208
new Type(Type::BUILTIN_TYPE_OBJECT, false, DoctrineRelation::class)
209209
)]],
210-
['json', null],
210+
['json', [new Type(Type::BUILTIN_TYPE_ARRAY, true, null, true)]],
211211
];
212212

213213
return $provider;

0 commit comments

Comments
 (0)