From 37128b2ca9a7286fb07e199c05c0b1d931aa67fc Mon Sep 17 00:00:00 2001 From: Alec Reynolds <1153738+reynoldsalec@users.noreply.github.com> Date: Wed, 11 Dec 2024 15:38:09 -0800 Subject: [PATCH 1/4] Added default config values to the Landofile after init. --- CHANGELOG.md | 2 ++ examples/drupal11/README.md | 12 ++++++++++++ inits/drupal10.js | 5 +++++ inits/drupal11.js | 5 +++++ inits/drupal6.js | 4 ++++ inits/drupal7.js | 3 +++ inits/drupal8.js | 3 +++ inits/drupal9.js | 5 +++++ 8 files changed, 39 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 235aca9..1ca83fd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ ## {{ UNRELEASED_VERSION }} - [{{ UNRELEASED_DATE }}]({{ UNRELEASED_LINK }}) +* Added default config values to the `.lando.yml` file after init. + ## v1.11.0 - [December 9, 2024](https://github.com/lando/drupal/releases/tag/v1.11.0) * Optimized for `midcore` diff --git a/examples/drupal11/README.md b/examples/drupal11/README.md index 619c0b3..f595c87 100644 --- a/examples/drupal11/README.md +++ b/examples/drupal11/README.md @@ -75,6 +75,18 @@ lando drush en jsonapi -y lando exec appserver -- curl localhost/jsonapi | grep "action--action" ``` +# Should have recipe defaults + +```bash +cd drupal11 +cat .lando.yml | grep "php: 8.3" +cat .lando.yml | grep "drush: ^13" +cat .lando.yml | grep "composer_version: 2-latest" + +# Should still have webroot +cat .lando.yml | grep "webroot: ." +``` + ## Destroy tests Run the following commands to trash this app like nothing ever happened. diff --git a/inits/drupal10.js b/inits/drupal10.js index b7ce9e6..e52f113 100644 --- a/inits/drupal10.js +++ b/inits/drupal10.js @@ -5,4 +5,9 @@ */ module.exports = { name: 'drupal10', + defaults: { + 'php': '8.1', + 'drush': '^11', + 'composer_version': '2-latest', + }, }; diff --git a/inits/drupal11.js b/inits/drupal11.js index 8a46488..a91b93d 100644 --- a/inits/drupal11.js +++ b/inits/drupal11.js @@ -5,4 +5,9 @@ */ module.exports = { name: 'drupal11', + defaults: { + 'php': '8.3', + 'drush': '^13', + 'composer_version': '2-latest', + }, }; diff --git a/inits/drupal6.js b/inits/drupal6.js index 03e8b27..8dd78da 100644 --- a/inits/drupal6.js +++ b/inits/drupal6.js @@ -5,4 +5,8 @@ */ module.exports = { name: 'drupal6', + defaults: { + 'php': '5.6', + 'drush': '8.4.5', + }, }; diff --git a/inits/drupal7.js b/inits/drupal7.js index 5f04823..a23d3a2 100644 --- a/inits/drupal7.js +++ b/inits/drupal7.js @@ -5,4 +5,7 @@ */ module.exports = { name: 'drupal7', + defaults: { + 'php': '7.4', + }, }; diff --git a/inits/drupal8.js b/inits/drupal8.js index 6300a8e..9b24679 100644 --- a/inits/drupal8.js +++ b/inits/drupal8.js @@ -5,4 +5,7 @@ */ module.exports = { name: 'drupal8', + defaults: { + 'php': '7.3', + }, }; diff --git a/inits/drupal9.js b/inits/drupal9.js index 81f749c..d13fe2b 100644 --- a/inits/drupal9.js +++ b/inits/drupal9.js @@ -5,4 +5,9 @@ */ module.exports = { name: 'drupal9', + defaults: { + 'php': '8.0', + 'drush': '^11', + 'composer_version': '2-latest', + }, }; From 88743a4646260fe45128f1079a527dbdd4464b30 Mon Sep 17 00:00:00 2001 From: Alec Reynolds <1153738+reynoldsalec@users.noreply.github.com> Date: Wed, 11 Dec 2024 15:40:33 -0800 Subject: [PATCH 2/4] Run tests against both stable and edge. --- .github/workflows/pr-drupal-tests.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pr-drupal-tests.yml b/.github/workflows/pr-drupal-tests.yml index 9aedd68..0c43a8c 100644 --- a/.github/workflows/pr-drupal-tests.yml +++ b/.github/workflows/pr-drupal-tests.yml @@ -32,6 +32,7 @@ jobs: - examples/drupal11-nginx lando-version: - 3-edge + - 3-stable os: - ubuntu-24.04 node-version: From 18e9bcf883dddefc54eff62d2f0d9d2f2dddf2cb Mon Sep 17 00:00:00 2001 From: Alec Reynolds <1153738+reynoldsalec@users.noreply.github.com> Date: Wed, 11 Dec 2024 15:44:18 -0800 Subject: [PATCH 3/4] Correct test format. --- examples/drupal11/README.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/examples/drupal11/README.md b/examples/drupal11/README.md index f595c87..54e6a07 100644 --- a/examples/drupal11/README.md +++ b/examples/drupal11/README.md @@ -73,11 +73,8 @@ lando drush si --db-url=mysql://drupal11:drupal11@database/drupal11 -y cd drupal11 lando drush en jsonapi -y lando exec appserver -- curl localhost/jsonapi | grep "action--action" -``` # Should have recipe defaults - -```bash cd drupal11 cat .lando.yml | grep "php: 8.3" cat .lando.yml | grep "drush: ^13" From 23fe67c5d0c543964258278c26355b87479e3969 Mon Sep 17 00:00:00 2001 From: Alec Reynolds <1153738+reynoldsalec@users.noreply.github.com> Date: Wed, 11 Dec 2024 15:57:33 -0800 Subject: [PATCH 4/4] Fix tests. --- examples/drupal11/README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/drupal11/README.md b/examples/drupal11/README.md index 54e6a07..6317a2a 100644 --- a/examples/drupal11/README.md +++ b/examples/drupal11/README.md @@ -76,11 +76,12 @@ lando exec appserver -- curl localhost/jsonapi | grep "action--action" # Should have recipe defaults cd drupal11 -cat .lando.yml | grep "php: 8.3" +cat .lando.yml | grep 'php: "8.3"' cat .lando.yml | grep "drush: ^13" cat .lando.yml | grep "composer_version: 2-latest" # Should still have webroot +cd drupal11 cat .lando.yml | grep "webroot: ." ```