From c69682099089ff3c4f1dc739fcfb7f960fcd1778 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Wed, 31 Jul 2024 18:19:03 +0100 Subject: [PATCH] Alias `symfony-cli` to `symfony` --- build-configs.yaml | 9 +++++++++ build.yaml | 9 --------- src/Action/CreateFinalConfigurationData.php | 6 ++++++ 3 files changed, 15 insertions(+), 9 deletions(-) create mode 100644 build-configs.yaml delete mode 100644 build.yaml diff --git a/build-configs.yaml b/build-configs.yaml new file mode 100644 index 0000000..d705617 --- /dev/null +++ b/build-configs.yaml @@ -0,0 +1,9 @@ +name: build-configs +template: symfony-cli +parameters: + nix: + devshell: + packages: + - bashInteractive + - php82 + - php82Packages.composer diff --git a/build.yaml b/build.yaml deleted file mode 100644 index f4ad31e..0000000 --- a/build.yaml +++ /dev/null @@ -1,9 +0,0 @@ -name: build-configs -type: symfony -language: php -flake: - devshell: - packages: - - bashInteractive - - php82 - - php82Packages.composer diff --git a/src/Action/CreateFinalConfigurationData.php b/src/Action/CreateFinalConfigurationData.php index d105df5..074c8ac 100644 --- a/src/Action/CreateFinalConfigurationData.php +++ b/src/Action/CreateFinalConfigurationData.php @@ -43,6 +43,12 @@ public function handle(string $configFile, \Closure $next) $configurationData['isDocker'] = isset($configurationData['dockerfile']); $configurationData['isFlake'] = isset($configurationData['flake']); + // Alias `symfony-cli` to `symfony`. In the future, this allows for + // different configurations for CLI-based and web-based applications. + if ($configurationData['type'] === 'symfony-cli') { + $configurationData['type'] = 'symfony'; + } + if (isset($configurationData['docker-compose'])) { $configurationData['dockerCompose'] = $configurationData['docker-compose']; $configurationData['docker-compose'] = null;