Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit f9f5f8d

Browse filesBrowse files
committed
[DoctrineBridge][DoctrineExtractor] Fix wrong guessed type for "json" type
1 parent bd0bf52 commit f9f5f8d
Copy full SHA for f9f5f8d

2 files changed

+1-3Lines changed: 1 addition & 3 deletions

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎src/Symfony/Bridge/Doctrine/PropertyInfo/DoctrineExtractor.php‎

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/Doctrine/PropertyInfo/DoctrineExtractor.php
-2Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,6 @@ public function getTypes($class, $property, array $context = [])
178178
switch ($typeOfField) {
179179
case self::$useDeprecatedConstants ? DBALType::TARRAY : 'array':
180180
case 'json_array':
181-
case self::$useDeprecatedConstants ? false : Types::JSON:
182181
return [new Type(Type::BUILTIN_TYPE_ARRAY, $nullable, null, true)];
183182

184183
case self::$useDeprecatedConstants ? DBALType::SIMPLE_ARRAY : Types::SIMPLE_ARRAY:
@@ -266,7 +265,6 @@ private function getPhpType($doctrineType)
266265
case self::$useDeprecatedConstants ? DBALType::TARRAY : 'array':
267266
case self::$useDeprecatedConstants ? DBALType::SIMPLE_ARRAY : Types::SIMPLE_ARRAY:
268267
case 'json_array':
269-
case self::$useDeprecatedConstants ? false : Types::JSON:
270268
return Type::BUILTIN_TYPE_ARRAY;
271269
}
272270

Collapse file

‎src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/DoctrineExtractorTest.php‎

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/DoctrineExtractorTest.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ public function typesProvider()
182182
];
183183

184184
if (class_exists(Types::class)) {
185-
$provider[] = ['json', [new Type(Type::BUILTIN_TYPE_ARRAY, true, null, true)]];
185+
$provider[] = ['json', null];
186186
}
187187

188188
return $provider;

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.