Set up a local 8-x-7.x environment
If you want to contribute to the Elasticsearch Connector module's 8.x-7.x branch, this guide will help you set up a local environment for developing and testing the module.
These instructions were last tested on 2026-04-30 using:
- DDEV v1.25.2 (Drupal's official development environment)
- ddev/ddev-drupal-contrib 1.1.5
- ddev/ddev-selenium-standalone-chrome 2.1.2
- ddev/ddev-elasticsearch v0.3.3
Requirements
You will need a relatively modern computer that can run DDEV. The commands below assume that you are using a Bash-like shell for Linux, Mac, or Windows Subsystem for Linux.
One-time setup
git clone --branch '8.x-7.x' https://git.drupalcode.org/project/elasticsearch_connector.git ec7
cd ec7
ddev config --auto
ddev add-on get ddev/ddev-drupal-contrib
ddev add-on get ddev/ddev-selenium-standalone-chrome
ddev add-on get ddev/ddev-elasticsearch
ddev start
echo '$settings["extension_discovery_scan_tests"] = TRUE;' | tee -a web/sites/default/settings.phpSetup for working on an issue
When you start working on a new issue, it is often a good idea to re-install Drupal in your development environment. This way, your previous test content and configuration won't affect the results of your current work.
# Switch to the issue fork here
ddev poser
ddev exec "cd web/core && yarn install"
ddev symlink-project
ddev drush -y site:install minimal
ddev drush -y pm:install toolbar field_ui views_ui facets
ddev drush -y theme:install claro
ddev drush -y config:set system.theme admin claro
ddev drush -y pm:install elasticsearch_connector search_api
ddev drush -y uli
Before submitting code
Elasticsearch Connector runs a number of linters and automated tests in CI when you submit code. Running these linters and automated tests before you submit code will make it faster to easier for maintainers to review and accept your code!
ddev phpcs
ddev phpstan
ddev phpunit
ddev eslintHelp improve this page
You can:
- Log in, click Edit, and edit this page
- Log in, click Discuss, update the Page status value, and suggest an improvement
- Log in and create a Documentation issue with your suggestion