Problem/Motivation

I've been maintaining my contrib projects using https://github.com/ddev/ddev-drupal-contrib for some time now, and have just been leaving the .ddev folder uncommitted (via ./git/info/exclude).

But now that DDEV has become the recommendation for Drupal local development, I feel it is now safe to commit the .ddev folder to the project (as recommended by ddev-drupal-contrib) and then document in the README.md how to setup a local environment for contribution/maintenance.

Optional. Commit the changes in the .ddev folder after this plugin installs. This saves other users from having to install this integration.

Other projects where .ddev has been committed.

https://git.drupalcode.org/project/og/-/tree/2.x?ref_type=heads
https://git.drupalcode.org/project/domain_perm/-/tree/2.0.x?ref_type=heads
https://www.drupal.org/project/svg_image_field/issues/3449084
https://www.drupal.org/project/date_filter/issues/3532384
https://www.drupal.org/project/calendar/issues/3518635
https://www.drupal.org/project/label_help/issues/3449755

Proposed resolution

  • Commit the .ddev/ folder and simplified config.yaml file
  • Since DDEV doesn't auto-install Drush anymore, add drush/drush to dev dependencies of the composer.json for standard cli tooling access. Note this module currently doesn't have any custom Drush commands, but it helps to have a fully functional DDEV local environment including drush, and it seems this is currently the only way.
  • Add CONTRIBUTING.md to document how to use DDEV Drupal Contrib and keep our dependencies up-to-date.

Issue fork date_recur-3537202

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

joelpittet created an issue. See original summary.

dpi’s picture

So long as it is kept up to date.

If it becomes neglected we should not hesitate to remove relevant parts.

For local dev also, this project will install everything it needs for linting by a `composer install && make lint` in the project directory. This should continue to work also.

I dont really operate like this with my contribs though, I typically install a contrib within the context of a site, whether ddev or not, alongside other contribs.

A relevant note: I recently rejected ddev scaffolding like this on SM, as I actively maintain that project and don't want ddev pieces. But since you are actively maintaining, I will not hold back in this project.

joelpittet’s picture

Thanks for the thoughtful response! Totally fair—if the DDEV setup ever becomes neglected, I have no problem with it being removed. I’m happy to keep it up-to-date as long as I’m actively contributing here.

Also, thanks for the note about make lint. I hadn’t noticed that was already in place—very helpful. The DDEV setup shouldn’t interfere with that workflow at all, but I’ll add a note in CONTRIBUTING.md to clarify how it fits alongside the DDEV tooling.

ressa’s picture

Another approach could be to include all the commands in the CONTRIBUTING.md file, to get the optimal DDEV environment up and running for a project, since I see there are commands to run in CONTRIBUTING.md:

https://git.drupalcode.org/project/calendar/-/blob/8.x-1.x/CONTRIBUTING.md

I wonder which commands are saved by including the .ddev folder? If it is mainly running ddev config --project-type=drupal and installing Drush, then it seems to me a bit overkill (and in danger of versions getting outdated) to commit .ddev, and the commands ddev config [...] and ddev composer require --dev drush/drush could instead be included as well, but maybe there are a fair deal more commands, and adjustments?

joelpittet’s picture

@ressa It definitely will get out of date eventually—no argument there. I may be able to wrap something like make lint into a ddev lint command, but I’ll probably keep them separate for now to avoid stepping on existing workflows.

The main benefit for me is having a consistent, isolated way to stand up this project for manual testing, without relying on a possibly patched version from another project or a contrib testbed with unrelated modules. I totally get the concern about long-term maintenance though, and I’m happy to revisit the setup if it becomes a burden. Though I am planning on keeping it up-to-date, so the burden is on me.

ressa’s picture

Thanks for clearing that up @joelpittet. I do get the benefits of having a consistent and predictable development environment, which you know the ins and outs of -- that's always great to have.

Also, we can only progress by experimenting, and trying new things out, and the insights gained might result in constructive feedback-worthy experiences for the DDEV Drupal Contrib project itself, which may get implemented, so that it may improve, to the benefit of all the other Drupal projects in the end.

joelpittet’s picture

@ressa so true! I just happened to get this in today https://github.com/ddev/ddev-drupal-contrib/pull/148

ressa’s picture

Nice @joelpittet, great to see your improvements on the DDEV tools got included! And impressive how fast the Stylelint issues got sorted out and committed. The Drop is truly always moving :)

  • joelpittet committed 3965d5ba on 3.9.x
    [#3537202] feat: Add DDEV Drupal Contrib for ease-of-maintenance
    
    By:...
joelpittet’s picture

Status: Needs review » Fixed

Merging this in to fix the brittle tests. We can adjust the CONTRIBUTING.md later.

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

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

Maintainers, please credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

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