ddev-drupal-core-dev icon indicating copy to clipboard operation
ddev-drupal-core-dev copied to clipboard

Support drush instead of using too-simple core commands

Open rfay opened this issue 1 year ago • 1 comments

I'm pretty sure we can support drush successfully with this technique, discussed in https://drupal.slack.com/archives/C62H9CWQM/p1714512734554949

hooks:
  post-start:
    exec: git stash && composer require drush/drush && git stash apply

Then we can use ddev drush si and all the other wonderful riches of drush...without messing up the composer.json or composer.lock.

It's slightly intrusive, and DDEV itself would never do anything like that by policy... but this is an opinionated add-on.

I'll be happy to do a PR to add this to config.ddev-drupal-core-dev.yaml after

  • https://github.com/justafish/ddev-drupal-core-dev/pull/23 gets in.

Tests and everything else could then be run using DDEV's settings.ddev.php, using all database types, etc.

rfay avatar Apr 30 '24 22:04 rfay

If you use the add-on with the joachim-n/drupal-core-development-project Composer template (see https://github.com/joachim-n/drupal-core-development-project/tree/1.0.15?tab=readme-ov-file#installation-on-ddev-with-the-justafishddev-drupal-core-dev-ddev-addon) then installing Drush becomes simple and doesn't mess up Composer files.

joachim-n avatar Jun 25 '24 13:06 joachim-n

I'm going to close this out as although we could install it in a way that appears to not touch the codebase, it influences the dependencies and it's important to know what you're currently working with. You can install it as a dependency, as you would any other package, but it'll be up to the end user to manage that as they see fit.

justafish avatar Mar 31 '25 16:03 justafish