Skip to content

v2.10.2

Choose a tag to compare

@bpacholek bpacholek released this 04 Oct 08:20
· 107 commits to main since this release

Patch release. One fix: with reconnect off, Reconnect is disabled now says why the connection ended.

Upgrading is recommended for anyone who runs with reconnect off, such as symfony-nats-messenger, which manages its own connections. Without it, the error that ended the connection was lost.

Upgrade notes

  • With reconnect off, Reconnect is disabled now carries the error that ended the connection as its previous exception (getPrevious()). Its message and code are unchanged.

Fixed

  • With reconnect off, Reconnect is disabled did not say why the connection ended (#172). The operator saw what reads like a configuration problem and had nothing to go on. The error that ended the connection is now chained as its previous exception:

    • the socket error of a failed read or write;
    • the ProtocolException of a stream that could not be parsed;
    • a server -ERR such as Stale Connection;
    • why the heartbeat gave up: The server did not answer the last 2 PINGs, its PING write failing, or the socket closing or breaking during its read.

    That holds for the operation that failed and for any operation that joined the recovery. The message is unchanged, so code that matches it keeps working.

Quality gates

The gates are PHPStan level 8, 2352 unit tests (with data sets), 149 live integration tests, 48 Behat scenarios, and every runnable example executed against a live server. Combined statement coverage is 99.23% (97% floor enforced in CI). Infection covered MSI is 94% over 7367 mutants (90% floor enforced in CI). The 10 new tests all fail on the old code. Mutation testing on the changed lines killed 24 of 26 mutants, and one more errored. The one survivor removes a catch block in the parse-failure path that this release does not change. The full record is in the CHANGELOG.