From 11b72e35d42dc4db79c7073cbfb4a0c420018a4d Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Sat, 3 Aug 2024 10:39:29 +0100 Subject: [PATCH] Remove unused Terraform templates --- src/Action/CreateListOfFilesToGenerate.php | 7 ------- src/DataTransferObject/ConfigDto.php | 2 +- src/Enum/ProjectType.php | 1 - tests/Kernel/Validator/ConfigurationValidatorTest.php | 4 +--- 4 files changed, 2 insertions(+), 12 deletions(-) diff --git a/src/Action/CreateListOfFilesToGenerate.php b/src/Action/CreateListOfFilesToGenerate.php index 2f216d4..28433bd 100644 --- a/src/Action/CreateListOfFilesToGenerate.php +++ b/src/Action/CreateListOfFilesToGenerate.php @@ -145,13 +145,6 @@ final class CreateListOfFilesToGenerate ); } break; - - case (strtolower(ProjectType::Terraform->name)): - $filesToGenerate = collect([ - new TemplateFile(data: 'terraform/.gitignore', name: '.gitignore'), - new TemplateFile(data: 'terraform/run', name: 'run'), - ]); - break; } if (Arr::get($configurationData, 'experimental.createTmuxStartupFile') === true) { diff --git a/src/DataTransferObject/ConfigDto.php b/src/DataTransferObject/ConfigDto.php index 3cb9816..293be12 100644 --- a/src/DataTransferObject/ConfigDto.php +++ b/src/DataTransferObject/ConfigDto.php @@ -242,7 +242,7 @@ final class ConfigDto #[Assert\Type('string')] public string $projectRoot; - #[Assert\Choice(choices: ['drupal', 'fractal', 'laravel', 'php-library', 'sculpin', 'symfony', 'terraform'])] + #[Assert\Choice(choices: ['drupal', 'fractal', 'laravel', 'php-library', 'sculpin', 'symfony'])] public string $type; #[Assert\Collection([ diff --git a/src/Enum/ProjectType.php b/src/Enum/ProjectType.php index 50b1f50..5555088 100644 --- a/src/Enum/ProjectType.php +++ b/src/Enum/ProjectType.php @@ -12,5 +12,4 @@ enum ProjectType: string case PHPLibrary = 'php-library'; case Sculpin = 'sculpin'; case Symfony = 'symfony'; - case Terraform = 'terraform'; } diff --git a/tests/Kernel/Validator/ConfigurationValidatorTest.php b/tests/Kernel/Validator/ConfigurationValidatorTest.php index 49ef283..819e351 100644 --- a/tests/Kernel/Validator/ConfigurationValidatorTest.php +++ b/tests/Kernel/Validator/ConfigurationValidatorTest.php @@ -32,8 +32,7 @@ class ConfigurationValidatorTest extends KernelTestCase ?array $extraDatabases, int $expectedViolationCount, ?string $expectedMessage, - ): void - { + ): void { $this->configurationDataDto->database = [ 'extra_databases' => $extraDatabases, 'type' => 'mariadb', @@ -219,7 +218,6 @@ class ConfigurationValidatorTest extends KernelTestCase yield 'laravel' => [ProjectType::Laravel->value, 0, null], yield 'php-library' => [ProjectType::PHPLibrary->value, 0, null], yield 'symfony' => [ProjectType::Symfony->value, 0, null], - yield 'terraform' => [ProjectType::Terraform->value, 0, null], ]; }