Skip to content

v2.26.5

Choose a tag to compare

@bpacholek bpacholek released this 13 Oct 13:16
· 53 commits to main since this release

Patch release.

Fixed

Your own processIncoming() or readIncoming() that is already waiting, on the socket or for the read slot, now wakes when another fiber's read stops a subscription at a handler failure (#199). The woken read returns zero frames. Your next call continues the stopped subscription before it reads, and throws that subscription's next handler failure if there is one. Before this, the rest of that subscription waited for the server's next bytes or for your read's own cancellation. On an idle connection that meant the server's next PING, two minutes away by default.

Who should upgrade: anyone who runs two of your own reads at once, or a read loop next to operations under handlerErrorsFailOperations: true whose handlers await. There are no API changes.

Before upgrading

  • Keep reading after both an exception and a zero-frame result. A loop that treats 0 frames as "nothing yet, read again" needs no change.
  • Your cancellation still wins when it fires together with the wake-up, with its own reason.
  • An idle loop does not spin. A wake-up that has fired is never reused.
  • Other reads are unchanged: operations' reads, recovery and lame-duck failover work as before.

Quality gates

  • PHPStan level 8.
  • 3591 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/patch 100%: every changed line is covered. Total coverage 99.04%.
  • Infection covered MSI 92.77% (90% floor enforced in CI). It skipped 4965 of the 8839 mutants it generated as too slow, so the score does not include them. No mutant escaped in the changed lines.
  • New StoppedSubscriptionReadWakeupTest, 19 cases, 12 of which fail on 2.26.3. The boundary test that pinned the old behaviour is inverted.
  • The issue's five mutations of the fix each fail cases, as do two broken variants of my own. One further variant, taking the signal earlier in the read, behaves the same in every scenario tried.

The full record is in the CHANGELOG.