Repository navigation
Conversation
desrosj
added this pull request to stack #159
September 13, 2026 00:45
desrosj
removed this pull request from stack #159
September 13, 2026 03:43
desrosj
force-pushed
the
fix-actions-5.6/docker-compose-v2
branch
from
September 13, 2026 03:45
6885338 to
19832be
Compare
desrosj
added this pull request to stack #335
September 13, 2026 03:46
desrosj
force-pushed
the
fix-actions-5.6/docker-compose-v2
branch
from
September 13, 2026 04:02
19832be to
bd48a77
Compare
desrosj
force-pushed
the
fix-actions-5.6/docker-compose-v2
branch
from
September 14, 2026 00:42
bd48a77 to
d9caa86
Compare
desrosj
force-pushed
the
fix-actions-5.6/docker-compose-v2
branch
from
September 14, 2026 01:39
d9caa86 to
c503481
Compare
desrosj
force-pushed
the
fix-actions-5.6/docker-compose-v2
branch
from
September 14, 2026 02:02
c503481 to
0600678
Compare
desrosj
removed this pull request from stack #335
September 21, 2026 19:17
desrosj
changed the base branch from
fix-actions-5.6/add-workflow-concurrency
to
wp/5.6
September 21, 2026 19:18
desrosj
force-pushed
the
fix-actions-5.6/docker-compose-v2
branch
from
September 21, 2026 19:20
0600678 to
97ccb22
Compare
desrosj
changed the base branch from
wp/5.6
to
fix-actions-5.6/add-workflow-concurrency
September 21, 2026 19:21
desrosj
added this pull request to stack #406
September 21, 2026 19:21
desrosj
removed this pull request from stack #406
September 22, 2026 16:17
desrosj
changed the base branch from
fix-actions-5.6/add-workflow-concurrency
to
wp/5.6
September 22, 2026 16:18
desrosj
force-pushed
the
fix-actions-5.6/docker-compose-v2
branch
from
September 22, 2026 16:20
97ccb22 to
ab31a7c
Compare
desrosj
changed the base branch from
wp/5.6
to
fix-actions-5.6/upgrade-node-to-14
September 22, 2026 16:21
desrosj
added this pull request to stack #466
September 22, 2026 16:21
desrosj
removed this pull request from stack #466
September 23, 2026 21:27
desrosj
added this pull request to stack #557
September 28, 2026 17:20
desrosj
removed this pull request from stack #557
October 6, 2026 16:14
desrosj
added this pull request to stack #631
October 6, 2026 16:14
desrosj
force-pushed
the
fix-actions-5.6/docker-compose-v2
branch
from
October 7, 2026 13:03
2104235 to
c654745
Compare
desrosj
removed this pull request from stack #631
October 7, 2026 18:05
desrosj
changed the base branch from
fix-actions-5.6/upgrade-node-to-14
to
wp/5.6
October 7, 2026 18:05
desrosj
force-pushed
the
fix-actions-5.6/docker-compose-v2
branch
from
October 7, 2026 18:07
c654745 to
abb7eda
Compare
desrosj
changed the base branch from
wp/5.6
to
fix-actions-5.6/upgrade-node-to-14
October 7, 2026 18:08
desrosj
added this pull request to stack #670
October 7, 2026 18:08
desrosj
force-pushed
the
fix-actions-5.6/docker-compose-v2
branch
from
October 8, 2026 17:40
abb7eda to
b26f2ee
Compare
desrosj
removed this pull request from stack #670
October 8, 2026 18:01
desrosj
added this pull request to stack #690
October 8, 2026 18:01
desrosj
force-pushed
the
fix-actions-5.6/docker-compose-v2
branch
from
October 9, 2026 15:49
b26f2ee to
508d8c0
Compare
desrosj
force-pushed
the
fix-actions-5.6/docker-compose-v2
branch
from
October 9, 2026 15:54
508d8c0 to
d12092a
Compare
`wp-env` shells out to the standalone `docker-compose` v1 binary via the `docker-compose` npm package's default export, and `run.js` spawns a literal `docker-compose` binary directly. GitHub's current Actions runner images no longer ship that binary — only the `docker compose` v2 subcommand (via the `docker` CLI plugin) is present — so every `wp-env` command (`start`, `stop`, `clean`, `logs`, `run`, `destroy`) fails immediately with `Error: spawn docker-compose ENOENT`, breaking every e2e/PHPUnit CI job that depends on `wp-env start`. Switch every `require( 'docker-compose' )` call to the package's `v2` export, which shells out to `docker compose` instead of the standalone binary, and update `run.js`'s direct `spawn()` call to invoke `docker` with a `compose` subcommand rather than the removed `docker-compose` binary. Update `cli.js`'s error-handling message and its accompanying unit test in `test/cli.js` to match the new wording. Bump the `docker-compose` npm dependency from `^0.22.2` to `^0.24.3`, the first release line whose `v2` export is available, and update `package-lock.json` accordingly (including a nested `yaml@2.2.2` dependency required by that version, since the rest of the lockfile is pinned to `yaml@^1.x`). `docker-compose@^0.24.3`'s new `yaml` dependency ships as an ESM package, which Jest cannot parse by default since `node_modules` is excluded from transformation unless explicitly allow-listed. Add a `transformIgnorePatterns` entry to `test/unit/jest.config.js` allow-listing `docker-compose`/`yaml` so Jest can transform them, otherwise `packages/env`'s own unit tests fail to load with "Jest encountered an unexpected token." This is the same fix WordPress#51339 (commit a0943f2, "wp-env: Migrate to Compose V2") applied to trunk in December 2023 to fix WordPress#51249, adapted to this branch's own file layout and dependency versions. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…vice that talks to the database.
Real CI on this PR (after the Docker Compose v2 fix let `wp-env start`
get this far for the first time) showed `wp-env start` hanging for ~30
retries and then failing at the `wp db check` step with:
```
mariadb-check: Got error: 1045: Access denied for user 'example username'@'172.18.0.5' (using password: YES) when trying to connect
```
The literal, space-containing username is not a real credential anyone
configured — it is the hardcoded placeholder default baked into the
official `wordpress` Docker image's `wp-config-docker.php` template:
```php
define( 'DB_USER', getenv_docker('WORDPRESS_DB_USER', 'example username') );
define( 'DB_PASSWORD', getenv_docker('WORDPRESS_DB_PASSWORD', 'example password') );
```
`getenv_docker()` re-evaluates these environment variables every time
`wp-config.php` is loaded, in whatever process loads it — it does not
bake a value in once and share it. `wp-config.php` is generated once by
the `wordpress`/`tests-wordpress` apache containers and then read from
the same shared volume by `cli`/`tests-cli` (which is what actually
runs `wp db check`/`wp core install`) and by `phpunit` (via the
`phpunit-wp-config.php` copy `sed` produces from it). Each of those
containers evaluates `getenv_docker()` using *its own* environment, so
setting `WORDPRESS_DB_USER`/`WORDPRESS_DB_PASSWORD` only on
`wordpress`/`tests-wordpress` is not enough — confirmed directly with a
local reproduction: doing only that still failed with the identical
error, because `cli`'s own environment (which is what `wp db check`
actually runs in) still had neither variable set.
This branch's `wordpress`/`tests-wordpress`/`cli`/`tests-cli`/`phpunit`
services only ever set `WORDPRESS_DB_NAME` (or nothing at all, for
`cli`/`tests-cli`/`phpunit`) — never `WORDPRESS_DB_USER` or
`WORDPRESS_DB_PASSWORD` — so every one of them falls back to the
placeholder default. The `mysql` service, meanwhile, is configured with
`MYSQL_ALLOW_EMPTY_PASSWORD: 'yes'` and no `MYSQL_USER`/`MYSQL_PASSWORD`
of its own, so the only account that actually exists in the database is
`root` with an empty password — never a match for the placeholder.
This is not a Docker Compose v1-vs-v2 regression: the environment
variables a `docker-compose.yml` `environment:` block passes into a
container work identically under both `docker-compose` and
`docker compose`, and this branch's own `build-docker-compose-config.js`
never set these two variables anywhere, in either case. The bug was
simply unreachable until now, because `wp-env start` always failed
earlier, at the `docker-compose` v1 binary's `ENOENT`.
Setting `WORDPRESS_DB_USER: 'root'` and `WORDPRESS_DB_PASSWORD: ''`
explicitly on every service that ever reads `wp-config.php` (matching
the `mysql` service's actual, empty-password `root` account) makes each
of them connect as a user that genuinely exists, instead of silently
falling back to the Docker image's documentation placeholder.
desrosj
removed this pull request from stack #690
October 9, 2026 19:56
desrosj
changed the base branch from
fix-actions-5.6/upgrade-node-to-14
to
wp/5.6
October 9, 2026 19:56
desrosj
force-pushed
the
fix-actions-5.6/docker-compose-v2
branch
from
October 9, 2026 19:57
d12092a to
253b1a2
Compare
desrosj
changed the base branch from
wp/5.6
to
fix-actions-5.6/upgrade-node-to-14
October 9, 2026 19:58
desrosj
added this pull request to stack #721
October 9, 2026 19:59
desrosj
removed this pull request from stack #721
October 16, 2026 01:09
desrosj
added this pull request to stack #727
October 16, 2026 01:10
desrosj
marked this pull request as ready for review
October 16, 2026 13:16
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Owner
Author
|
Moved to WordPress#84961. |
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.
What?
Migrates
wp-env(packages/env) from Docker Compose v1 to v2, and fixes the database credentials mismatch the migration exposes.Why?
Every
wp-envjob (PHPinunit-test.yml,Admin - 1toAdmin - 4inend2end-test.yml) fails withspawn docker-compose ENOENT:packages/envruns the standalone Docker Compose v1 binary, which GitHub's runner images no longer ship. Trunk fixed the same problem in #51339 (WordPress@a0943f2, December 2023).With that fixed,
wp-env startreaches the database and fails atwp db check:example usernameis thewordpressimage's placeholder default, used whenWORDPRESS_DB_USER/WORDPRESS_DB_PASSWORDare unset. No service on this branch sets them, while themysqlservice (MYSQL_ALLOW_EMPTY_PASSWORD: 'yes') only hasrootwith an empty password. This isn't a v2 regression; the v1ENOENTfailure hid it.How?
Migrate wp-env to Docker Compose V2.: adapts trunk's commit to this branch's files (lib/commands/{clean,destroy,logs,run,start,stop}.js,lib/wordpress.js,lib/cli.js). Eachrequire( 'docker-compose' )uses thev2export;run.jsspawnsdockerwithcomposeprepended instead ofdocker-compose;cli.js's error message and itstest/cli.jsassertion say "docker compose".docker-compose(npm) is pinned to exactly0.24.0, the newest release still onyaml@^1.10.2, theyamlline the rest of the lockfile uses;0.24.1and later move toyaml@^2.2.2, whose optional chaining Node 12 can't parse; the pin predates the Node 14 upgrade in Repairwp/5.6branch Actions: Upgrade Node.js from 12 to 14 #334, and relaxing it is out of scope.package-lock.jsongets a nestedyaml@1.10.3underdocker-compose.Set explicit WORDPRESS_DB_USER/WORDPRESS_DB_PASSWORD on every service that talks to the database.: addsWORDPRESS_DB_USER: 'root'andWORDPRESS_DB_PASSWORD: ''to thewordpress,tests-wordpress,cli,tests-cliandphpunitservices. Each container readswp-config.phpwith its own environment, so all of them need it.Verified on this fix's earlier unstacked PR (#284) with the
react-native-screensfix (#294) applied:Install WordPressgot pastENOENTandAccess denied. At this point in the stack, CI jobs still stop at thenpm cifailure fixed by #294, and then at the database setup that later PRs fix.Use of AI Tools
This PR was created by Claude Code under my supervision. All code should be treated as AI-produced and not yet reviewed by a human until this PR is marked Ready for Review.