Skip to content

Commit 9b220eb

Browse files
Merge branch '4.4' into 5.3
* 4.4: 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 2125210 + 2b98071 commit 9b220eb

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
@@ -167,6 +167,7 @@ public function getTypes(string $class, string $property, array $context = [])
167167
switch ($typeOfField) {
168168
case Types::ARRAY:
169169
case 'json_array':
170+
case 'json':
170171
return [new Type(Type::BUILTIN_TYPE_ARRAY, $nullable, null, true)];
171172

172173
case Types::SIMPLE_ARRAY:
@@ -281,6 +282,7 @@ private function getPhpType(string $doctrineType): ?string
281282
case Types::ARRAY:
282283
case Types::SIMPLE_ARRAY:
283284
case 'json_array':
285+
case 'json':
284286
return Type::BUILTIN_TYPE_ARRAY;
285287
}
286288

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)