NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
Packagist · #3249 most downloaded on Packagist
Trait to run all tests in a fiber
Last release 4 months ago
08 Jun 2026
Ships fairly regularly
a new release about every 13 months
Nearly every release is documented
notes for 5 of 5 stable releases
Nothing withdrawn
no release was ever pulled
3 years old
5 releases · first in 2024
Total pull requests resolved: 27
One column per month.
Total pull requests resolved: 5
PHPUnit 10+ + added it as a dependency to enforce supported versions
Total pull requests resolved: 1
<div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="<?php
<?php
declare(strict_types=1);
use PHPUnit\Framework\TestCase;
use React\Promise\Promise;
use WyriHaximus\React\PHPUnit\RunTestsInFibersTrait;
use function React\Async�wait;
final class SomeTest extends TestCase
{
use RunTestsInFibersTrait;
/**
* @test
*/
public function happyFlow()
{
self::assertTrue(await(new Promise(static function (callable $resolve): void {
$resolve(true);
})));
}
}This package supports marking a test failed once a timeout has been reached. Note that this doesn't stop anything
running in the fiber the rest runs in or cleans up the loop as we cannot kill the running fiber once it starts. An
exception is thrown in the scope between the test and PHPUnit that handles running the test in a fiber. And this is out
of control of the test.
<?php
declare(strict_types=1);
use PHPUnit\Framework\TestCase;
use React\Promise\Promise;
use WyriHaximus\React\PHPUnit\RunTestsInFibersTrait;
use WyriHaximus\React\PHPUnit\TimeOut;
use function React\Async�wait;
#[TimeOut(30)]
final class SomeTest extends TestCase
{
use RunTestsInFibersTrait;
/**
* @test
*/
#[TimeOut(0.1)]
public function happyFlow()
{
self::assertTrue(await(new Promise(static function (callable $resolve): void {
$resolve(true);
})));
}
}Your coding agent can read these notes before it upgrades. Set up the MCP server →