diff --git a/src/Maker/MakeCrud.php b/src/Maker/MakeCrud.php index 4bd748c1b..a1e2418d4 100644 --- a/src/Maker/MakeCrud.php +++ b/src/Maker/MakeCrud.php @@ -260,7 +260,7 @@ public function configureDependencies(DependencyBuilder $dependencies) $dependencies->addClassDependency( DoctrineBundle::class, - 'orm-pack' + 'orm' ); $dependencies->addClassDependency( diff --git a/src/Maker/MakeEntity.php b/src/Maker/MakeEntity.php index d7142c88c..917013d4d 100644 --- a/src/Maker/MakeEntity.php +++ b/src/Maker/MakeEntity.php @@ -374,9 +374,7 @@ private function askForNextField(ConsoleStyle $io, array $fields, string $entity } $type = null; - $types = Type::getTypesMap(); - // remove deprecated json_array - unset($types[Type::JSON_ARRAY]); + $types = $this->getTypesMap(); $allValidTypes = array_merge( array_keys($types), @@ -428,9 +426,7 @@ private function askForNextField(ConsoleStyle $io, array $fields, string $entity private function printAvailableTypes(ConsoleStyle $io) { - $allTypes = Type::getTypesMap(); - // remove deprecated json_array - unset($allTypes[Type::JSON_ARRAY]); + $allTypes = $this->getTypesMap(); if ('Hyper' === getenv('TERM_PROGRAM')) { $wizard = 'wizard 🧙'; @@ -885,4 +881,16 @@ private function getEntityNamespace(): string { return $this->doctrineHelper->getEntityNamespace(); } + + private function getTypesMap(): array + { + $types = Type::getTypesMap(); + + // remove deprecated json_array if it exists + if (\defined(sprintf('%s::JSON_ARRAY', Type::class))) { + unset($types[Type::JSON_ARRAY]); + } + + return $types; + } } diff --git a/src/Maker/MakeRegistrationForm.php b/src/Maker/MakeRegistrationForm.php index b7250fefa..ec48be354 100644 --- a/src/Maker/MakeRegistrationForm.php +++ b/src/Maker/MakeRegistrationForm.php @@ -479,7 +479,7 @@ public function configureDependencies(DependencyBuilder $dependencies): void $dependencies->addClassDependency( DoctrineBundle::class, - 'orm-pack' + 'orm' ); $dependencies->addClassDependency( diff --git a/tests/Maker/MakeEntityLegacyTest.php b/tests/Maker/MakeEntityLegacyTest.php index c753b964d..388455d21 100644 --- a/tests/Maker/MakeEntityLegacyTest.php +++ b/tests/Maker/MakeEntityLegacyTest.php @@ -509,7 +509,7 @@ public function getTestDetails() '', ]) ->setRequiredPhpVersion(70200) - ->addExtraDependencies('ux-turbo-mercure') + ->addExtraDependencies('symfony/ux-turbo-mercure') ->configureDatabase() ->addReplacement( '.env', @@ -546,7 +546,7 @@ public function getTestDetails() ]) ->setRequiredPhpVersion(70200) ->addExtraDependencies('api') - ->addExtraDependencies('ux-turbo-mercure') + ->addExtraDependencies('symfony/ux-turbo-mercure') ->setFixtureFilesPath(__DIR__.'/../fixtures/legacy/MakeEntity/MakeEntity') ->configureDatabase() ->updateSchemaAfterCommand() diff --git a/tests/Maker/MakeEntityTest.php b/tests/Maker/MakeEntityTest.php index 98b15fd8d..599f7ac76 100644 --- a/tests/Maker/MakeEntityTest.php +++ b/tests/Maker/MakeEntityTest.php @@ -619,7 +619,7 @@ public function getTestDetails() ]) ->setRequiredPhpVersion(80000) ->useDoctrineAttributeMapping() - ->addExtraDependencies('ux-turbo-mercure') + ->addExtraDependencies('symfony/ux-turbo-mercure') ->configureDatabase() ->addReplacement( '.env', @@ -657,7 +657,7 @@ public function getTestDetails() ->setRequiredPhpVersion(80000) ->useDoctrineAttributeMapping() ->addExtraDependencies('api') - ->addExtraDependencies('ux-turbo-mercure') + ->addExtraDependencies('symfony/ux-turbo-mercure') ->setFixtureFilesPath(__DIR__.'/../fixtures/MakeEntity') ->configureDatabase() ->updateSchemaAfterCommand()