Repository navigation
v2.25.7
Patch release, test suite only: no library code changed. The no-spin tests can see a timer loop inside the connection's read again (#184).
Nothing changes for applications. This guards the next change to the read path against the most expensive kind of regression: a wait that polls on a timer instead of parking.
Testing & CI
- The no-spin tests count event-loop registrations again (#184).
- The gap:
ReadWakeupLifecycleTest::testTwoPollsOfOneQueueWithOneMessageandOperationReadReconnectLifecycleTest::testAnOperationParkedOnTheReconnectItStartedDoesNotSpincounted what returns to the operation and what reaches the socket. A wait that polls on a timer inside the connection does neither: polling the read slot while the application's read holds it, or polling the recovery while a reconnect backs off. Such a wait registers hundreds of timers and passed both counts. The process-wide registration count that used to catch it was dropped in 2.18.0, because leaked clients of earlier tests landed their handshake bursts in the wait. - The fix: each data case of both tests now runs in a process of its own. It installs
tests/Support/LoopRegistrationCounter.php, a transparent driver around the event loop's own driver that counts every registration, and bounds the registrations over its wait to fewer than 50. - The numbers: the current code registers 6 and 4. A 1 ms polling loop in place of either wait registers about 900 to 1,800, and tens of thousands with no delay, also when it runs in a detached fiber.
- Checked: all six such loops pass the old assertions and fail the new bound. Locally, Infection 0.33.3 ran a mutant inside the isolated child process, and the new bound killed it.
- The gap:
- New
LoopRegistrationCounterTest(10 cases) covers the driver's forwarding and counting, the windows, and process isolation.
Quality gates
- PHPStan level 8, full repository.
- 3388 unit tests (with data sets), run in CI on PHP 8.2 to 8.5 under Xdebug, the four isolated no-spin cases each in a process of their own. Also 157 live integration tests and 49 Behat scenarios; all runnable examples pass.
- Coverage unchanged at 99.03%, since no library line changed.
- Infection covered MSI 92.74% (90% floor enforced in CI). Its initial coverage run executes the isolated cases.
- The six timer-loop mutants from the issue pass the old assertions and fail the new bound.
LoopRegistrationCounterTest: 10 new cases.
The full record is in the CHANGELOG.