From bdd2487c11fec18f05dde0d092459168f49ee6b2 Mon Sep 17 00:00:00 2001 From: Gareth Alexander Date: Wed, 10 Nov 2021 12:03:54 +0000 Subject: [PATCH 1/4] Updating for BLT 12 and drupal 9. --- README.md | 19 ++++++++++++++----- composer.json | 5 ++++- src/Blt/Plugin/Commands/BehatDdevCommand.php | 4 ++-- src/Blt/Plugin/Commands/DdevCommand.php | 4 ++-- 4 files changed, 22 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 6c100c9..627bf1f 100644 --- a/README.md +++ b/README.md @@ -11,22 +11,31 @@ This plugin is **community-created** and **community-supported**. Acquia does no To create a new BLT project with ddev integration for local development, run the following commands, replacing `mysite` with your desired BLT project name: ``` -composer create-project --no-interaction acquia/blt-project mysite +composer create-project --no-interaction --no-install drupal/recommended-project mysite cd mysite -composer require lcatlett/blt-ddev +sudo sed -i '' -e "s|web/|docroot/|g" composer.json +composer config minimum-stability dev +composer config prefer-stable true +composer config platform.php 7.4 +composer require acquia/blt:^12 --no-update --sort-packages +composer update --with-all-dependencies +composer require --dev acquia/blt-phpcs acquia/blt-drupal-check acquia/blt-behat +composer require --dev acquia/blt-drupal-test --no-update +composer update --with-all-dependencies +composer require --dev lcatlett/blt-ddev blt recipes:ddev --no-interaction ddev blt setup ``` ## Installation and usage -To use this plugin on your existing BLT 10 project, you must be using ddev [v1.10.0](https://github.com/drud/ddev/releases/tag/v1.10.0) or newer. +To use this plugin on your existing BLT 12 project, you must be using ddev [v1.10.0](https://github.com/drud/ddev/releases/tag/v1.10.0) or newer. You can check your version of ddev with `ddev version`. In your project, require the plugin with Composer: -`composer require lcatlett/blt-ddev` +`composer require --dev lcatlett/blt-ddev` Initialize the ddev integration by calling `recipes:ddev`, which is a custom BLT command provided by this plugin: @@ -34,7 +43,7 @@ Initialize the ddev integration by calling `recipes:ddev`, which is a custom BLT Running `blt recipes:ddev` will initialize a .ddev folder as well as BLT configuration in the /blt directory of your project. -The plugin adds a custom ddev command in the web container which makes the `ddev blt` command available. **All blt commands should be prefixed with `ddev` to ensure it is excuted within the docker container**, for example: +The plugin adds a custom ddev command in the web container which makes the `ddev blt` command available. **All blt commands should be prefixed with `ddev` to ensure it is executed within the docker container**, for example: `ddev blt setup` diff --git a/composer.json b/composer.json index 807e71a..8766d58 100644 --- a/composer.json +++ b/composer.json @@ -11,7 +11,10 @@ "role": "Maintainer" } ], - "require": {}, + "require": { + "acquia/blt": "^12", + "acquia/blt-behat": "^1.1" + }, "autoload": { "psr-4": { "Lcatlett\\BltDdev\\": "./src/" diff --git a/src/Blt/Plugin/Commands/BehatDdevCommand.php b/src/Blt/Plugin/Commands/BehatDdevCommand.php index 3ead89f..e8293c2 100644 --- a/src/Blt/Plugin/Commands/BehatDdevCommand.php +++ b/src/Blt/Plugin/Commands/BehatDdevCommand.php @@ -2,9 +2,9 @@ namespace Lcatlett\BltDdev\Blt\Plugin\Commands; -use Acquia\Blt\Robo\Commands\Tests\BehatCommand; +use Acquia\BltBehat\Blt\Plugin\Commands\BehatTestCommand; -class BehatDdevCommand extends BehatCommand { +class BehatDdevCommand extends BehatTestCommand { /** * Executes all behat tests. diff --git a/src/Blt/Plugin/Commands/DdevCommand.php b/src/Blt/Plugin/Commands/DdevCommand.php index e558b54..3a73883 100644 --- a/src/Blt/Plugin/Commands/DdevCommand.php +++ b/src/Blt/Plugin/Commands/DdevCommand.php @@ -68,7 +68,7 @@ public function ddevProjectInit() { public function ddevInit() { $this->say('Generating ddev project config'); $result = $this->taskExecStack() - ->exec("ddev config --docroot docroot --project-type drupal8 --project-name \"{$this->getConfigValue('project.machine_name')}\"") + ->exec("ddev config --docroot docroot --project-type drupal9 --project-name \"{$this->getConfigValue('project.machine_name')}\"") ->run(); if (!$result->wasSuccessful()) { @@ -127,7 +127,7 @@ public function ddevConfig() { } // Re-init settings after old settings are removed.. - $this->invokeCommand('tests:behat:init:config'); + $this->invokeCommand('recipes:behat:init'); } } } From cf360d1bed74574501487f87c94898ab9cd87d79 Mon Sep 17 00:00:00 2001 From: Gareth Alexander Date: Sat, 7 May 2022 02:37:03 +0100 Subject: [PATCH 2/4] Adding BLT 13 as a requirement. --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 8766d58..8fdf812 100644 --- a/composer.json +++ b/composer.json @@ -12,7 +12,7 @@ } ], "require": { - "acquia/blt": "^12", + "acquia/blt": "^12 || ^13", "acquia/blt-behat": "^1.1" }, "autoload": { From 606e6677355baae09340d5d81b760189dc984b7b Mon Sep 17 00:00:00 2001 From: Gareth Alexander Date: Fri, 12 Aug 2022 15:24:03 +0100 Subject: [PATCH 3/4] Removing unneeded commands from the README. --- README.md | 8 -------- 1 file changed, 8 deletions(-) diff --git a/README.md b/README.md index 627bf1f..a53cbd4 100644 --- a/README.md +++ b/README.md @@ -14,14 +14,6 @@ To create a new BLT project with ddev integration for local development, run the composer create-project --no-interaction --no-install drupal/recommended-project mysite cd mysite sudo sed -i '' -e "s|web/|docroot/|g" composer.json -composer config minimum-stability dev -composer config prefer-stable true -composer config platform.php 7.4 -composer require acquia/blt:^12 --no-update --sort-packages -composer update --with-all-dependencies -composer require --dev acquia/blt-phpcs acquia/blt-drupal-check acquia/blt-behat -composer require --dev acquia/blt-drupal-test --no-update -composer update --with-all-dependencies composer require --dev lcatlett/blt-ddev blt recipes:ddev --no-interaction ddev blt setup From f5dd72d3b74130a4ec997b44a97e1115e0747af6 Mon Sep 17 00:00:00 2001 From: Gareth Alexander Date: Fri, 12 Aug 2022 15:28:45 +0100 Subject: [PATCH 4/4] Updating for BLT 12 and drupal 9. --- README.md | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index a53cbd4..9d4151a 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ ddev blt setup ## Installation and usage -To use this plugin on your existing BLT 12 project, you must be using ddev [v1.10.0](https://github.com/drud/ddev/releases/tag/v1.10.0) or newer. +To use this plugin on your existing BLT 12 project, you must be using ddev [v1.10.0](https://github.com/drud/ddev/releases/tag/v1.10.0) or newer. You can check your version of ddev with `ddev version`. @@ -50,7 +50,4 @@ The plugin adds a custom ddev command in the web container which makes the `ddev ## Behat configuration -BLT makes some assumptions about the local development environment which informs behat testing configuration. This plugin extends the default `blt behat` command to run behat tests in a container as a dedicated service via the `ddev blt behat` command. - - - +BLT makes some assumptions about the local development environment which informs behat testing configuration. This plugin extends the default `blt behat` command to run behat tests in a container as a dedicated service via the `ddev blt behat` command.