[wp-trac] [WordPress Trac] #62807: Protect `env:start` command against connection issues
WordPress Trac
noreply at wordpress.org
Sun Jan 18 21:19:55 UTC 2026
#62807: Protect `env:start` command against connection issues
------------------------------+-----------------------------
Reporter: desrosj | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Future Release
Component: Build/Test Tools | Version:
Severity: normal | Resolution:
Keywords: has-patch | Focuses:
------------------------------+-----------------------------
Changes (by r1k0):
* keywords: has-patch needs-testing => has-patch
Comment:
== Combined Bug Reproduction & Patch Test Report
Patch tested: https://github.com/WordPress/wordpress-develop/pull/9360
=== Steps to Reproduce or Test
1. Inside the `wordpress-develop` directory.
2. Run the following commands:
{{{
npm install
npm run build:dev
}}}
3. [#=step3] Also run this `sudo nano /etc/hosts` and add this line at the
end `127.0.0.1 packagist.org repo.packagist.org`, save and exit. (This
should simulate **Packagist** down).
4. Run `npm run env:start`
5. 🐞 Observe the output when the environment attempts to start.
=== Expected Results
When reproducing a bug:
- ❌ Error condition occurs.
- `npm run env:start` fails with raw Composer/Curl output (e.g. curl error
7) and no clear indication that the failure is due to Packagist/network
issues.
When testing a patch to validate it works as expected:
- ✅ `npm run env:start` fails gracefully.`
- A clear, actionable error message is displayed indicating that `composer
update` failed and that the issue is commonly caused by network problems
or Packagist.org downtime.
- The message does not suggest a Docker failure.
=== Output before patch
{{{
> WordPress at 7.0.0 env:start
> node ./tools/local-env/scripts/start.js && node ./tools/local-
env/scripts/docker.js run -T --rm php composer update -W
[+] up 5/5
✔ Network wordpress-develop_wpdevnet Created
0.4s
✔ Container wordpress-develop-php-1 Created
3.1s
✔ Container wordpress-develop-mysql-1 Healthy
196.7s
✔ Container wordpress-develop-cli-1 Created
2.4s
✔ Container wordpress-develop-wordpress-develop-1 Created
2.7s
.env file already exists. .env.example was not copied.
Container wordpress-develop-php-run-032dd7814657 Creating
Container wordpress-develop-php-run-032dd7814657 Created
Loading composer repositories with package information
In CurlDownloader.php line 398:
curl error 7 while downloading https://repo.packagist.org/packages.json:
Fa
iled to connect to repo.packagist.org port 443: Connection refused
update [--with WITH] [--prefer-source] [--prefer-dist] [--prefer-install
PREFER-INSTALL] [--dry-run] [--dev] [--no-dev] [--lock] [--no-install]
[--no-audit] [--audit-format AUDIT-FORMAT] [--no-security-blocking] [--no-
autoloader] [--no-suggest] [--no-progress] [-w|--with-dependencies] [-W
|--with-all-dependencies] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader]
[-a|--classmap-authoritative] [--apcu-autoloader] [--apcu-autoloader-
prefix APCU-AUTOLOADER-PREFIX] [--ignore-platform-req IGNORE-PLATFORM-REQ]
[--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [-m
|--minimal-changes] [--patch-only] [-i|--interactive] [--root-reqs]
[--bump-after-update [BUMP-AFTER-UPDATE]] [--] [<packages>...]
}}}
=== Environment
- OS: Linux
- WordPress: 7.0-alpha (wordpress-develop)
- Node.js: v20.19.6
- npm: 10.8.2
- Docker: v4.56.0
==== Actual Results
Without patch:
- ❌ `env:start` fails during the Composer step with Curl/Composer errors
(e.g. “Connection refused”), making the root cause difficult to identify.
With patch applied:
- ✅ Issue resolved with patch.
- `env:start` fails when Packagist is unavailable.
- The failure is accompanied by a clear message:
"There was a failure running composer update."
“This is often caused by network issues or Packagist.org downtime.”
“Please check your internet connection and try again.”
=== Output after patch
{{{
> WordPress at 7.0.0 env:start
> node ./tools/local-env/scripts/start.js
[+] up 5/5
✔ Network wordpress-develop_wpdevnet Created
0.6s
✔ Container wordpress-develop-php-1 Created
3.0s
✔ Container wordpress-develop-mysql-1 Healthy
66.6s
✔ Container wordpress-develop-wordpress-develop-1 Created
3.4s
✔ Container wordpress-develop-cli-1 Created
3.1s
Container wordpress-develop-php-run-d17f917b3495 Creating
Container wordpress-develop-php-run-d17f917b3495 Created
Loading composer repositories with package information
In CurlDownloader.php line 398:
curl error 7 while downloading https://repo.packagist.org/packages.json:
Fa
iled to connect to repo.packagist.org port 443: Connection refused
update [--with WITH] [--prefer-source] [--prefer-dist] [--prefer-install
PREFER-INSTALL] [--dry-run] [--dev] [--no-dev] [--lock] [--no-install]
[--no-audit] [--audit-format AUDIT-FORMAT] [--no-security-blocking] [--no-
autoloader] [--no-suggest] [--no-progress] [-w|--with-dependencies] [-W
|--with-all-dependencies] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader]
[-a|--classmap-authoritative] [--apcu-autoloader] [--apcu-autoloader-
prefix APCU-AUTOLOADER-PREFIX] [--ignore-platform-req IGNORE-PLATFORM-REQ]
[--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [-m
|--minimal-changes] [--patch-only] [-i|--interactive] [--root-reqs]
[--bump-after-update [BUMP-AFTER-UPDATE]] [--] [<packages>...]
There was a failure running composer update.
This is often caused by network issues or Packagist.org downtime.
Please check your internet connection and try again.
}}}
=== Additional Notes
- Ensure to remove the line added in [#step3 step 3] to make **Packagist**
reachable.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/62807#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list