Repository navigation
Conversation
Author
|
This has been based on what is done in #35 but we needed more for our headless Drupal setup. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Issue
This add-on assumes the conventional Drupal layout:
That is not always how DDEV Drupal projects are structured. For example, a superproject may keep the Drupal application in a subdirectory:
A project may also use another docroot name, such as
docroot/orpublic/, or hold its custom PHP code in paths other thanmodules/customand themes/custom.When commands assume the DDEV project root is also the Composer root, or assume web/ is always the docroot, generated configuration can end up in the wrong directory, tools cannot find dependencies, and checks can silently skip project code.
Why This Matters
Supporting DDEV's configured layout means the add-on works with established repositories without requiring users to reorganise their project just to run local code-quality checks.
The add-on should consistently distinguish between:
.ddev/lives.composer.json,vendor/,package.json, andnode_modules/live.core/,modules/,themes/, andprofiles/live.Those may be the same location in a standard installation, but DDEV explicitly supports configurations where they are not.
Expected Behaviour
DDEV_DOCROOT, including overrides fromconfig.*.yaml.DDEV_COMPOSER_ROOTwhen available, with a safe fallback to the configuredcomposer_root.DDEV_DOCROOT; downstream code should treat this as . rather than repeatedly falling back toweb.modules/,themes/,profiles/, andsites/broadly, rather than only*/custom, while retaining exclusions for contrib,node_modules, public files, and generated DDEV settings.web/layout.Manual Testing Instructions
Test each layout after installing the add-on:
Standard layout:
docroot: webNested Composer root:
Alternative docroot:
Project-root docroot:
For each layout, verify that generated configuration is created beside the correct
composer.json, that commands find dependencies, and that the default lint scopes target the real Drupal code rather than an assumedweb/directory.Automated Testing Overview
Add coverage for:
webdocroot;composer_rootwith a nested docroot;config.*.yaml;modules/customandthemes/custom;AI assistance disclosure
This issue was drafted with AI assistance and reviewed, edited, and submitted by me. I am responsible for its accuracy and for any follow-up discussion.