Repository navigation
v2.26.1
Patch release. When the read of one of the library's operations gets a chunk that fails to parse, it now recovers the connection the way a read that met a lost socket does (#195): the recovery runs in a fiber of its own, and the operation waits for it only within its own wait. Before this fix the operation waited for the whole reconnect, in three ways:
- Past its own deadline: a
request()with a 300 ms timeout came back only after the outage. - Past its wake-up: a reply delivered from the frames ahead of the bad bytes was returned only once the reconnect was over.
- Ignoring
waitForReconnect: false.
A chunk fails to parse on an unknown control line, a malformed MSG/HMSG line, a frame over the bound derived from the server's max_payload, or a payload not ended by CRLF. These come from a server or proxy bug, so the case is rare. There are no API changes.
What changes:
- Within its own wait. An operation whose chunk fails to parse now behaves as one whose read met a lost socket does:
- it times out at its deadline while the recovery carries on
- it returns at once whatever the frames ahead of the bad bytes brought it
- with waiting disabled, it fails at once with
Connection is not open, theProtocolExceptionas its previous
- Same order. The frames ahead of the bad bytes are still delivered and the
ProtocolExceptionreported before the recovery starts. - Lame-duck failover. A lame-duck
INFOamong those frames now fails over in a fiber of its own, as from a chunk that parses, and the recovery joins it. - Unchanged: your own
processIncoming()/readIncoming(), a serving loop's read and the heartbeat still recover inline and wait for all of it.
Quality gates
- PHPStan level 8.
- 3458 unit tests (with data sets) on PHP 8.2 to 8.5, 159 live integration tests and 49 Behat scenarios. All runnable examples pass.
codecov/patch100%: every changed line is covered. Total coverage 99.04%.- Infection covered MSI 92.78% (90% floor enforced in CI). It skipped 4915 of the 8806 mutants it generated as too slow, so the score does not include them. No mutant escaped in the changed parse-error path.
- New
CorruptChunkOperationReadTest, 9 cases, 7 of which fail on 2.26.0. Each holds the recovery's dial until the operation has returned, so the order of events decides. Three broken variants of the fix each fail at least one case. - One E2E run on the pull request failed in
testAPullConsumerRunEndedByATerminalStatusHandsOverWhatALaterPullReceivedAfterIt(#211). That test also fails intermittently on unchanged 2.26.0 and is not touched by this release. The push run of the same commit passed it.
The full record is in the CHANGELOG.