Use Drush in development environment

Created on 10 October 2025, 4 days ago

Problem/Motivation

We now have documentation on how to set up a local environment for developing elasticsearch_connector-8.x-7.x with ddev/ddev-drupal-contrib.

ddev/ddev-drupal-contrib's README says "Any development dependencies (e.g. Drush) should be manually added to require-dev in your project's composer.json file. Don't use the composer require command to do that."

Currently, Drush is not installed, so some of the later instructions in our documentation fails.

Steps to reproduce

Run...

git clone --branch '8.x-7.x' https://git.drupalcode.org/project/elasticsearch_connector.git ec7
cd ec7
ddev config --project-type=drupal --docroot=web --php-version=8.3 --corepack-enable --project-name=ec7
ddev add-on get ddev/ddev-drupal-contrib
ddev start
ddev poser
ddev symlink-project
ddev add-on get ddev/ddev-elasticsearch
ddev drush -y site:install minimal

... you get the error...

drush is not available. You may need to 'ddev composer require drush/drush'
Failed to run drush -y uli: exit status 1

Proposed resolution

Add "drush/drush": "^10.0 || ^11.0 || ^12.0 || ^13" to composer.json's require-dev section.

We're selecting these versions of Drush because elasticsearch_connector-8.x-7.x says it supports drupal core ^9.2 || ^10 || ^11, and Drush's documentation says those versions of Drush support the same versions of Drupal core. Note this also matches what we do in the 8.0.x version of the module.

Remaining tasks

  1. Merge request
  2. Review and feedback
  3. RTBC and feedback
  4. Commit
  5. Release

User interface changes

None.

API changes

None.

Data model changes

None.

📌 Task
Status

Active

Version

7.0

Component

Code

Created by

🇨🇦Canada mparker17 UTC-4

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024