(#5046) Implement DDev#5091
Conversation
687d540 to
e2757d6
Compare
2faedee to
532cd8e
Compare
|
@blairlearn to test:
|
There was a problem hiding this comment.
Pull request overview
Implements a DDEV-based local development stack and updates supporting configuration to align with a MySQL 8 / PHP 8.3 workflow, including Drupal settings integration and updated browser-testing container wiring.
Changes:
- Add DDEV configuration (core config, mounts, hooks, selenium-chrome addon configs, helper command, and web-build customization).
- Adjust Drupal settings layering to load DDEV settings via Acquia Recommended Settings/global includes.
- Update a functional test to tolerate different
SIMPLETEST_BASE_URLhosts, and adjust PHPUnit output printer.
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 12 comments.
Show a summary per file
| File | Description |
|---|---|
phpunit.xml |
Switch PHPUnit result printer implementation. |
docroot/sites/settings/global.settings.php |
Load settings.ddev.php from a global settings include when running under DDEV. |
docroot/sites/default/settings/default.local.settings.php |
Refresh local settings template and adjust paths/assertion handling. |
docroot/sites/default/settings/default.includes.settings.php |
Update guidance/comments and add phpcs:ignore for requires. |
docroot/sites/default/settings.php |
Add an early return; to prevent DDEV from re-injecting its include; relies on global include instead. |
docroot/sites/default/settings.ddev.php |
Add DDEV-managed Drupal settings (DB config, logging, mail transport overrides, etc.). |
docroot/modules/custom/cgov_js_app_module/tests/src/Functional/JSOnlyAppModulePluginBuildTest.php |
Normalize expected config output across varying base URLs. |
.ddev/web-build/pre.Dockerfile.certificates |
Attempt to install NIH root certs during web image build. |
.ddev/docker-compose.selenium-chrome_extras.yaml |
DDEV selenium-chrome routing/external link wiring. |
.ddev/docker-compose.selenium-chrome.yaml |
Add selenium standalone chromium service and link it to web. |
.ddev/docker-compose.mounts.yml |
Mount host auth files into the web container for npm/composer. |
.ddev/config.yaml |
Define DDEV project config, hooks, MySQL 8, PHP 8.3, node version, and extra packages. |
.ddev/config.selenium-standalone-chrome.yaml |
Provide environment variables for Drupal browser testing via selenium container. |
.ddev/commands/web/blt |
Add a ddev blt helper command. |
.ddev/addon-metadata/ddev-selenium-standalone-chrome/manifest.yaml |
Track installed DDEV addon metadata. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| ## https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-npm-registry#authenticating-with-a-personal-access-token | ||
| ## You should only need read:packages if you are not someone | ||
| ## that works with it frequently enough to know what this | ||
| ## iss. (For read-only don't follow the npm login steps) |
There was a problem hiding this comment.
Typo in comment: "iss." → "is."
| ## iss. (For read-only don't follow the npm login steps) | |
| ## is. (For read-only don't follow the npm login steps) |
|
On my system, CyLance (antivirus) blocks attempts to install certificates with
|
Yes. With some hacking. These steps assume you have NOT run any
|
Yes; with notes. The obvious: Change your "port": 9003,
"pathMappings": {
"/var/www/html/docroot": "${workspaceRoot}/docroot",
"/var/www/html/vendor": "${workspaceRoot}/vendor"
}The non-obvious: Our |
- Needed to update settings.php to support ddev. - Changed PHPUnit printerClass to default so excess html files are not created each run. - Needed to allow ddev host in js app module config to as it uses something different than our old code did. Closes #5046
d1a93be to
6482c78
Compare
This updates the tech stack to use MySQL 8, but also it is a refresh of the dev stack to be easier to use.
Closes #5046
Notes
DB Persistence
The DB contents survive on restart and rebuild.
Addons
With DDev, most add-ons seem to be separate services, OR, maybe better put, what one might think should be installed in the web service might not be done that way, but added as a separate service.
ddev-selenium-standalone-chromeis a perfect example of this. It is an add-on for installing selenium and chrome, but it actually is a headless chrome browser running in a separate container. This add-on sets up everything for drupal testing. (Kernel, Functional, Functional Javascript, and Nightwatch.webservice from another container, which required some slight changes to a js_app_module test.Mutagen
DDev by default uses mutagen to handle file synchronization. It is supposed to be faster than normal bind mounting. In fact an install took like 4:30 on my M1.
There is a major downside that we need to evaluate: if you switch branches or make other edits when the container is down, upon restart, the files in the container are synchronized back to the host. I can see this cause all kinds of issues.