[DoctrineBridge][DoctrineExtractor] Fix wrong guessed type for "json" type
This commit is contained in:
parent
bd0bf5240f
commit
f9f5f8df3e
@ -178,7 +178,6 @@ class DoctrineExtractor implements PropertyListExtractorInterface, PropertyTypeE
|
||||
switch ($typeOfField) {
|
||||
case self::$useDeprecatedConstants ? DBALType::TARRAY : 'array':
|
||||
case 'json_array':
|
||||
case self::$useDeprecatedConstants ? false : Types::JSON:
|
||||
return [new Type(Type::BUILTIN_TYPE_ARRAY, $nullable, null, true)];
|
||||
|
||||
case self::$useDeprecatedConstants ? DBALType::SIMPLE_ARRAY : Types::SIMPLE_ARRAY:
|
||||
@ -266,7 +265,6 @@ class DoctrineExtractor implements PropertyListExtractorInterface, PropertyTypeE
|
||||
case self::$useDeprecatedConstants ? DBALType::TARRAY : 'array':
|
||||
case self::$useDeprecatedConstants ? DBALType::SIMPLE_ARRAY : Types::SIMPLE_ARRAY:
|
||||
case 'json_array':
|
||||
case self::$useDeprecatedConstants ? false : Types::JSON:
|
||||
return Type::BUILTIN_TYPE_ARRAY;
|
||||
}
|
||||
|
||||
|
@ -182,7 +182,7 @@ class DoctrineExtractorTest extends TestCase
|
||||
];
|
||||
|
||||
if (class_exists(Types::class)) {
|
||||
$provider[] = ['json', [new Type(Type::BUILTIN_TYPE_ARRAY, true, null, true)]];
|
||||
$provider[] = ['json', null];
|
||||
}
|
||||
|
||||
return $provider;
|
||||
|
Reference in New Issue
Block a user