Skip to content

Commit b0ae4ad

Browse files
committed
bug #482 Remove deprecated json_array type (LeJeanbono)
This PR was squashed before being merged into the 1.0-dev branch (closes #482). Discussion ---------- Remove deprecated json_array type Fix #447 Commits ------- 500d64b Remove deprecated json_array type
2 parents 31a7597 + 500d64b commit b0ae4ad

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/GeneratorTwigHelper.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ public function getEntityFieldPrintCode($entity, $field): string
5151
$printCode .= ' ? '.$printCode.'|date(\'H:i:s\') : \'\'';
5252
break;
5353
case 'json':
54-
case 'json_array':
5554
$printCode .= ' ? '.$printCode.'|json_encode : \'\'';
5655
break;
5756
case 'array':

src/Maker/MakeEntity.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,8 +318,12 @@ private function askForNextField(ConsoleStyle $io, array $fields, string $entity
318318
}
319319

320320
$type = null;
321+
$types = Type::getTypesMap();
322+
// remove deprecated json_array
323+
unset($types[Type::JSON_ARRAY]);
324+
321325
$allValidTypes = array_merge(
322-
array_keys(Type::getTypesMap()),
326+
array_keys($types),
323327
EntityRelation::getValidRelationTypes(),
324328
['relation']
325329
);

0 commit comments

Comments
 (0)