From 7978c03709398df70ed30d9a0bb13db3f4e3671b Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Mon, 13 Mar 2023 21:18:30 +0000 Subject: [PATCH] feat: initial Laravel support Refs #17 --- src/Validator/ConfigurationValidator.php | 1 + templates/justfile.twig | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/src/Validator/ConfigurationValidator.php b/src/Validator/ConfigurationValidator.php index ce4b1a6..25c9cf4 100644 --- a/src/Validator/ConfigurationValidator.php +++ b/src/Validator/ConfigurationValidator.php @@ -40,6 +40,7 @@ final class ConfigurationValidator implements ValidatorInterface new Assert\Choice([ 'drupal-project', 'fractal', + 'laravel', 'php-library', ]), ], diff --git a/templates/justfile.twig b/templates/justfile.twig index 7cb7480..2617c9f 100644 --- a/templates/justfile.twig +++ b/templates/justfile.twig @@ -26,5 +26,14 @@ fractal *args: {{ "just yarn fractal {{ args }}" | raw }} {% endif %} +{% if "laravel" is same as type %} +artisan *args: + docker compose run \ + --entrypoint php \ + --rm \ + --tty \ + php artisan {{ "{{ args }}" | raw }} +{% endif %} + _exec +args: {{ "docker compose exec {{ args }}" | raw }}