From b797729ccbbc8761d2294e63bbc4b16f7138e7e1 Mon Sep 17 00:00:00 2001 From: Fabrizio Manca Date: Wed, 5 Feb 2025 13:20:27 +0100 Subject: [PATCH 1/3] Possibility to add custom templates when [make] command --- src/Generator.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Generator.php b/src/Generator.php index fbadc1bca..75fa8160c 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, From c28f52cde971e664df684066f98dc458706bc526 Mon Sep 17 00:00:00 2001 From: Fabrizio Manca Date: Wed, 5 Feb 2025 13:30:49 +0100 Subject: [PATCH 2/3] Possibility to add custom templates when [make] command --- src/Generator.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Generator.php b/src/Generator.php index 75fa8160c..ea95a9c87 100644 --- a/src/Generator.php +++ b/src/Generator.php @@ -264,7 +264,7 @@ public function generateController(string $controllerClassName, string $controll */ public function generateTemplate(string $targetPath, string $templateName, array $variables = []) { - $templatePath = 'templates/bundles/MakerBundle/' . $templateName; + $templatePath = 'templates/bundles/MakerBundle/'.$templateName; if ($this->fileManager->fileExists($templatePath)) { $templateName = $templatePath; } From 018ce206ec83345e9d35ae78dec043c579a210ab Mon Sep 17 00:00:00 2001 From: "Agilelab.fr" Date: Mon, 24 Feb 2025 07:43:52 +0100 Subject: [PATCH 3/3] fixing tests --- composer.json | 1 + 1 file changed, 1 insertion(+) 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",