wyrihaximus/async-test-utilities
Async test utilities for PHP that provide a TestCase with random namespaces and directories, fiber-based test execution with a configurable TimeOut attribute, and callable expectation helpers for ReactPHP async tests.
require-dev package. It ships no runtime code, so it never appears on a customer-facing roadmap. The decision it informs is "how much do we invest in test infrastructure for our async/concurrent PHP services?"React\Async fibers), flaky, timing-dependent tests are a recurring tax: re-runs in CI, false red builds, slow feedback. AsyncTestCase gives every test a fiber, a default 30s timeout, and a per-class/per-method #[TimeOut] attribute — directly converting "hangs forever / passes only on my laptop" into deterministic failures.Adopt only when all of these hold:
react/event-loop, react/promise, react/async) in production code and your tests need to exercise that loop.Look elsewhere (or build in-house) when:
composer.json post-install-cmd / post-update-cmd blocks to call make on-install-or-update, and will create those blocks if absent. Supply-chain-sensitive orgs should refuse this outright; it's an install-time mutation of your build config by a dev dependency.For executives (30 seconds): This is a free, MIT-licensed developer tool that makes tests for our asynchronous PHP code stop hanging and stop flaking. It's a dev-only dependency — zero runtime footprint, zero customer impact, no license cost. The catch is that it's effectively a one-person project with no meaningful external adoption, and since v10 it edits our composer.json on install. Recommendation: approve as a time-boxed experiment on the one service that actually uses ReactPHP, with a documented exit path, not as a standards-level dependency.
For engineering leadership: The value is concentrated and real — fiber-per-test execution, a default 30s global timeout with #[TimeOut] overrides at class and method level, random namespaces/temp dirs for storage fixtures, and expectCallableExactly / expectCallableOnce helpers. That's maybe a day of internal work to replicate, so the honest framing is convenience, not capability. The risks are equally concentrated: bus factor of one; no dependents to validate it; a hard coupling to PHP 8.4 + PHPUnit 12; and an install-time composer.json rewrite that will fail review in any org with supply-chain controls.
Recommended decision: Pilot it behind a spike branch, measure flaky-test rate and CI wall-clock before/after, and set a 30-day checkpoint. If the in-house alternative is cheap (it likely is at this surface area), prefer owning a ~150-line base test case and keep the vendor dependency out of the build graph entirely.
How can I help you explore Laravel packages today?