wyrihaximus/react-phpunit-run-tests-in-fiber
PHPUnit trait to run each test inside a PHP Fiber, making it easy to use ReactPHP async/await in tests. Includes optional per-test or per-class timeout attributes to fail slow tests (without stopping the running fiber).
Adopt only if:
react/http, react/socket, or custom event loops) and requires testing fiber-dependent logic.Avoid if:
To Engineering:
"This package lets us test async ReactPHP code in Laravel without reinventing the wheel. By running tests in fibers, we catch race conditions and context errors early—critical for real-time features like live event processing or high-concurrency APIs. It’s a drop-in trait: just add use RunTestsInFibersTrait and use await() directly. No need to refactor tests or manage custom event loops. Perfect for validating async services while keeping sync tests fast."
To Executives: "For products relying on real-time performance (e.g., live dashboards, event-driven workflows), this tool ensures our async code works reliably before release. It reduces flaky tests and production bugs in high-concurrency scenarios, directly supporting our scalability goals. A lightweight investment that pays off in stability and developer productivity—especially for teams adopting async architectures."
How can I help you explore Laravel packages today?