ddev-drupal-contrib icon indicating copy to clipboard operation
ddev-drupal-contrib copied to clipboard

feat: ddev quickstart command

Open hanoii opened this issue 1 year ago • 5 comments

This is my take into a single command for the contrib init.

Add a quickstart command that does everything that's needed to be done for getting the project up and running instead of manually following the steps.

Adds tests

Fixes #15

hanoii avatar Oct 21 '24 17:10 hanoii

Ok, this is interesting and thanks to the tests I caught this early...

The whole ddev config --update becomes a chicken and egg problem. Because when one sets this up initially for a new module, or even when you clone a module that has this already setup, there's no codebase on the module, which means. that ddev poser will just fail because d11 requires php 8.3.

While I am keeping that here, if this approach of having a quickstart command is desired which I hope because it's simple I'd suggest removing the need for ddev config --auto or maybe better provide an override of the drupal version through command line on ddev so that one can tell ddev to set its own defaults for the drupal core even if no core is detected.

hanoii avatar Oct 21 '24 18:10 hanoii

So most of the times this will not be an issue. Obviously downgrading this to an older core might cause issues but that was going to always be the case.

Let me know your thoughts on something like this

hanoii avatar Oct 21 '24 19:10 hanoii

IMO its a bit too much code to maintain. I'd just as soon stick with current docs approach. Happy to discuss more.

weitzman avatar Oct 23 '24 03:10 weitzman

I am not too convinced on this approach, but I am on the idea of having something like this as part of the addon. What I would actually would like, is that this same code would be able to switch core easily with the sensible defaults.

Right now in my mind my next steps around this idea would be to change the command into something like ddev init or ddev contrib:init with a drupal core argument so that one could easily switch cores, removing everything and reinstalling.

This is something I would like to have in such a ddev, but I don't want to spend a ton of time going around this is this is not something you'd consider accepting, so let me know if you want to discuss further.

I also offer to help maintaining this add-on.

hanoii avatar Oct 23 '24 14:10 hanoii

That command sounds useful. I would weigh its usefulness against the maint burden of it. I'm not sure how to decision would end up. https://github.com/ddev/ddev-drupal-contrib?tab=readme-ov-file#changing-the-drupal-core-version describes the current steps and they look simple enough to me that I'm not sure we should ship a command for it.

weitzman avatar Oct 28 '24 21:10 weitzman

We added a drush core-version command. I think our current setup intructions do the job.

weitzman avatar Aug 25 '25 12:08 weitzman