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 - merge request !153 created by @mparker17 in #2
  2. Review and feedback - skipped by @mparker17 in #3
  3. RTBC and feedback - skipped by @mparker17 in #4
  4. Commit - done by @mparker17 in #5
  5. Release - released in 8.x-7.0-alpha7

User interface changes

None.

API changes

None.

Data model changes

None.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

mparker17 created an issue. See original summary.

mparker17’s picture

Title: Use Drush in development environment » Use Drush in development environment; sort require, require-dev alphabetically
Issue summary: View changes
Status: Active » Needs review

I've also sorted require, require-dev to provide more stability (see this change record and associated links for more on why sorting provides more stability)

mparker17’s picture

Issue summary: View changes
Status: Needs review » Reviewed & tested by the community

Testbot is happy. Because this is a change that only affects development environments, I'm going to merge this.

  • mparker17 committed 60561646 on 8.x-7.x
    [#3551546] task: Use Drush in development environment; sort require,...
mparker17’s picture

Issue summary: View changes
Status: Reviewed & tested by the community » Fixed

Merged! I'll update the issue summary when I release this change.

Now that this issue is closed, please review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, please credit people who helped resolve this issue.

mparker17’s picture

Issue summary: View changes

This has been released in 8.x-7.0-alpha7!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.