diff --git a/src/Doctrine/EntityRegenerator.php b/src/Doctrine/EntityRegenerator.php index 8b8b5e957..d72b65364 100644 --- a/src/Doctrine/EntityRegenerator.php +++ b/src/Doctrine/EntityRegenerator.php @@ -44,7 +44,7 @@ public function regenerateEntities(string $classOrNamespace): void { try { $metadata = $this->doctrineHelper->getMetadata($classOrNamespace); - } catch (MappingException | LegacyCommonMappingException | PersistenceMappingException $mappingException) { + } catch (MappingException|LegacyCommonMappingException|PersistenceMappingException $mappingException) { $metadata = $this->doctrineHelper->getMetadata($classOrNamespace, true); } diff --git a/src/Resources/skeleton/doctrine/Entity.tpl.php b/src/Resources/skeleton/doctrine/Entity.tpl.php index 9c013803e..19f3f0d49 100644 --- a/src/Resources/skeleton/doctrine/Entity.tpl.php +++ b/src/Resources/skeleton/doctrine/Entity.tpl.php @@ -2,7 +2,8 @@ namespace ; -use ApiPlatform\Core\Annotation\ApiResource; +use ApiPlatform\Metadata\ApiResource; +use ApiPlatform\Core\Annotation\ApiResource; use ; use Doctrine\ORM\Mapping as ORM;