Skip to content

Commit

Permalink
Merge branch '3.4' into 4.4
Browse files Browse the repository at this point in the history
* 3.4:
  [Config] fix test
  [Intl][3.4] Bump ICU 66.1
  fix import from config file using type: glob
  [DoctrineBridge][DoctrineExtractor] Fix wrong guessed type for "json" type
  • Loading branch information
nicolas-grekas committed Mar 13, 2020
2 parents 1b45647 + e818172 commit 6c99d25
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 0 additions & 2 deletions PropertyInfo/DoctrineExtractor.php
Expand Up @@ -175,7 +175,6 @@ public function getTypes($class, $property, array $context = [])
switch ($typeOfField) {
case self::$useDeprecatedConstants ? DBALType::TARRAY : Types::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:
Expand Down Expand Up @@ -290,7 +289,6 @@ private function getPhpType(string $doctrineType): ?string
case self::$useDeprecatedConstants ? DBALType::TARRAY : Types::ARRAY:
case self::$useDeprecatedConstants ? DBALType::SIMPLE_ARRAY : Types::SIMPLE_ARRAY:
case 'json_array':
case self::$useDeprecatedConstants ? false : Types::JSON:
return Type::BUILTIN_TYPE_ARRAY;
}

Expand Down
2 changes: 1 addition & 1 deletion Tests/PropertyInfo/DoctrineExtractorTest.php
Expand Up @@ -221,7 +221,7 @@ public function typesProvider()
];

if (class_exists(Types::class)) {
$provider[] = ['json', [new Type(Type::BUILTIN_TYPE_ARRAY, true, null, true)]];
$provider[] = ['json', null];
}

return $provider;
Expand Down

0 comments on commit 6c99d25

Please sign in to comment.