From c68bca3d564b4f24afe7d04de42e1337552e801e Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Sat, 22 Jul 2023 10:40:02 +0100 Subject: [PATCH] chore: rename drupal-project to drupal --- src/Action/CreateListOfFilesToGenerate.php | 4 ++-- src/DataTransferObject/Config.php | 2 +- templates/docker-compose.yaml.twig | 2 +- templates/{drupal-project => drupal}/phpunit.xml.dist.twig | 0 templates/env.example.twig | 2 +- templates/justfile.twig | 4 ++-- templates/php/phpcs.xml.twig | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) rename templates/{drupal-project => drupal}/phpunit.xml.dist.twig (100%) diff --git a/src/Action/CreateListOfFilesToGenerate.php b/src/Action/CreateListOfFilesToGenerate.php index 2fef45d..2652ac7 100644 --- a/src/Action/CreateListOfFilesToGenerate.php +++ b/src/Action/CreateListOfFilesToGenerate.php @@ -100,9 +100,9 @@ final class CreateListOfFilesToGenerate ); } - if ('drupal-project' === Arr::get($configurationData, 'type')) { + if ('drupal' === Arr::get($configurationData, 'type')) { // Add a Drupal version of phpunit.xml.dist. - $filesToGenerate[] = new TemplateFile(data: 'drupal-project/phpunit.xml.dist', name: 'phpunit.xml.dist'); + $filesToGenerate[] = new TemplateFile(data: 'drupal/phpunit.xml.dist', name: 'phpunit.xml.dist'); } if (Arr::get($configurationData, 'experimental.createGitHubActionsConfiguration', false) === true) { diff --git a/src/DataTransferObject/Config.php b/src/DataTransferObject/Config.php index ce95902..4414667 100644 --- a/src/DataTransferObject/Config.php +++ b/src/DataTransferObject/Config.php @@ -54,7 +54,7 @@ final class Config #[Assert\NotBlank] public string $name; - #[Assert\Choice(choices: ['drupal-project', 'fractal', 'laravel', 'php-library', 'vuejs'])] + #[Assert\Choice(choices: ['drupal', 'fractal', 'laravel', 'php-library', 'vuejs'])] #[Assert\NotBlank] public string $type; diff --git a/templates/docker-compose.yaml.twig b/templates/docker-compose.yaml.twig index 3d6936d..c6f5806 100644 --- a/templates/docker-compose.yaml.twig +++ b/templates/docker-compose.yaml.twig @@ -15,7 +15,7 @@ x-proxy: &default-proxy x-app: &default-app volumes: - - "${DOCKER_WEB_VOLUME:-./{{ "drupal-project" == type ? drupal.docroot : '' }}:{{ project_root }}{{ "drupal-project" == type ? '/' ~ drupal.docroot : '' }}}" + - "${DOCKER_WEB_VOLUME:-./{{ "drupal" == type ? drupal.docroot : '' }}:{{ project_root }}{{ "drupal" == type ? '/' ~ drupal.docroot : '' }}}" env_file: - .env restart: "${DOCKER_RESTART_POLICY:-unless-stopped}" diff --git a/templates/drupal-project/phpunit.xml.dist.twig b/templates/drupal/phpunit.xml.dist.twig similarity index 100% rename from templates/drupal-project/phpunit.xml.dist.twig rename to templates/drupal/phpunit.xml.dist.twig diff --git a/templates/env.example.twig b/templates/env.example.twig index 7c5ee04..f79d004 100644 --- a/templates/env.example.twig +++ b/templates/env.example.twig @@ -13,7 +13,7 @@ export COMPOSE_PROFILES=node export DOCKER_WEB_VOLUME=.:{{ project_root }} {% endif %} -{% if "drupal-project" == type %} +{% if "drupal" == type %} {% if experimental.useNewDatabaseCredentials %} export MYSQL_DATABASE=app export MYSQL_PASSWORD=app diff --git a/templates/justfile.twig b/templates/justfile.twig index 4c8e98d..1968eb3 100644 --- a/templates/justfile.twig +++ b/templates/justfile.twig @@ -21,7 +21,7 @@ composer *args: alias phpunit := test test *args: -{% if "drupal-project" is same as type %} +{% if "drupal" is same as type %} {{ "just _exec php phpunit --colors=always {{ args }}" | raw }} {% else %} {{ "just _run php phpunit --colors=always {{ args }}" | raw }} @@ -31,7 +31,7 @@ test-watch *args: nodemon --ext "*" --watch "." --exec "just test {{ args }} || exit 1" --ignore */sites/simpletest {% endif %} -{% if "drupal-project" is same as type %} +{% if "drupal" is same as type %} drush *args: {{ "just _exec php drush {{ args }}" | raw }} diff --git a/templates/php/phpcs.xml.twig b/templates/php/phpcs.xml.twig index cd142de..7b504a1 100644 --- a/templates/php/phpcs.xml.twig +++ b/templates/php/phpcs.xml.twig @@ -16,7 +16,7 @@ {% endif %} {% endfor %} - {% if type is same as "drupal-project" and "Drupal" in php.phpcs.standards or php.phpcs.standards is empty %} + {% if type is same as "drupal" and "Drupal" in php.phpcs.standards or php.phpcs.standards is empty %}