diff --git a/composer.json b/composer.json index 3b9010d17..fb7c094df 100644 --- a/composer.json +++ b/composer.json @@ -30,6 +30,7 @@ "composer/semver": "^3.0", "doctrine/doctrine-bundle": "^2.5.0", "doctrine/orm": "^2.15|^3", + "doctrine/persistence": "^2.5|^3", "symfony/http-client": "^6.4|^7.0", "symfony/phpunit-bridge": "^6.4.1|^7.0", "symfony/security-core": "^6.4|^7.0", diff --git a/src/Generator.php b/src/Generator.php index fbadc1bca..ea95a9c87 100644 --- a/src/Generator.php +++ b/src/Generator.php @@ -264,6 +264,11 @@ public function generateController(string $controllerClassName, string $controll */ public function generateTemplate(string $targetPath, string $templateName, array $variables = []) { + $templatePath = 'templates/bundles/MakerBundle/'.$templateName; + if ($this->fileManager->fileExists($templatePath)) { + $templateName = $templatePath; + } + $this->generateFile( $this->fileManager->getPathForTemplate($targetPath), $templateName,