Problem/Motivation

In #3587140: Make maintenance easier: update ddev-drupal-contrib, phpstan, we added some DDEV tooling to make it easier to set up Scanner-Fixer API for contributing.

In a similar issue for another module, @boromino and @mparker17 came up with a script to further simplify setting up the module for development: a custom ddev reset-test-env command to install dependencies, re-installs Drupal and the module, and display a link that contributors can use to log into the test site.

This seems like a useful addition to Scanner-Fixer API, so lets port that custom command to this module.

Proposed resolution

Add a .ddev/commands/host/reset-test-env file that looks like...

#!/bin/bash
ddev poser
ddev exec "cd web/core && yarn install"
ddev symlink-project
ddev drush -y site:install standard
ddev drush -y pm:install scanner_fixer_api_test
ddev drush -y uli

Once this issue is merged, update the documentation accordingly.

Remaining tasks

  1. Merge request - merge request !7 created by @mparker17 in #2
  2. Community/Maintainer review - skipped by @mparker17 in #5
  3. Commit 3.0.x - done by @mparker17 in #6
  4. Commit 2.0.x - done by @mparker17 in #7
  5. Update docs - done by @mparker17 in #8
  6. Release 3.0.x
  7. Release 2.0.x

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

Issue summary: View changes

Created merge request !7. Let's see what testbot thinks.

mparker17’s picture

Status: Active » Needs review

To manually test, clone a new copy of scanner_fixer_api, and set it up like...

git clone --branch '3.0.x' https://git.drupalcode.org/project/scanner_fixer_api.git
cd scanner_fixer_api
ddev config --auto
ddev add-on get ddev/ddev-drupal-contrib
ddev start
echo '$settings["extension_discovery_scan_tests"] = TRUE;' | tee -a web/sites/default/settings.php

ddev reset-test-env

... you should get a working dev environment.

mparker17’s picture

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

Skipping community/maintainer review because it was authored and tested by a maintainer. Merging; after, I will cherry-pick to 2.0.x.

  • mparker17 committed ed7c855c on 3.0.x
    feat: #3588285 Add a reset-test-env ddev host command for easier...

  • mparker17 committed 8e0505e8 on 2.0.x
    feat: #3588285 Add a reset-test-env ddev host command for easier...
mparker17’s picture

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

Merged and cherry-picked to the 2.0.x branch. I also updated the documentation. I will update this issue when these changes make it into a release.

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

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

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

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