Skip to content

Commit

Permalink
Merge pull request #12 from thegbomb/d9-branch
Browse files Browse the repository at this point in the history
  • Loading branch information
lcatlett authored Dec 28, 2023
2 parents 8e3275b + 76959c8 commit ed9560f
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 17 deletions.
16 changes: 7 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,30 +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 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:

`blt recipes:ddev`

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`

Expand All @@ -49,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.
6 changes: 2 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,9 @@
}
],
"require": {
"acquia/blt-behat": "dev-master"
"acquia/blt": "^12 || ^13",
"acquia/blt-behat": "^1.1"
},
"conflict": {
"acquia/blt": "<=12.5.1"
},
"autoload": {
"psr-4": {
"Lcatlett\\BltDdev\\": "./src/"
Expand Down
4 changes: 2 additions & 2 deletions src/Blt/Plugin/Commands/BehatDdevCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

namespace Lcatlett\BltDdev\Blt\Plugin\Commands;

use Acquia\BltBehat\Blt\Plugin\Commands\BehatCommand;
use Acquia\BltBehat\Blt\Plugin\Commands\BehatTestCommand;

class BehatDdevCommand extends BehatCommand {
class BehatDdevCommand extends BehatTestCommand {

/**
* Executes all behat tests.
Expand Down
4 changes: 2 additions & 2 deletions src/Blt/Plugin/Commands/DdevCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()) {
Expand Down Expand Up @@ -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');
}
}
}
Expand Down

0 comments on commit ed9560f

Please sign in to comment.