* feature: Added support for READONLY responses from AWS Elastic Cache
* chore: improve -READONLY handler comment and add changelog entry (#1656)
* tests: add unit test demonstrating ServerException behavior with READONLY error
* Fix sentinel discovery methods not catching StreamInitException
The getMaster(), getSlaves(), and updateSentinels() methods only catch
ConnectionException when connecting to Sentinel nodes. StreamInitException
(thrown by stream_socket_client() failures) extends PredisException directly,
not ConnectionException, so it propagates uncaught — preventing fallback to
the next Sentinel node.
This causes complete application failure when any single Sentinel is
unreachable, even if other Sentinels are healthy.
Add StreamInitException to the catch clause using a union type in all three
methods. This is more precise than catching PredisException, which would
also swallow ServerException (e.g. "ERR No such master with that name")
and mask configuration errors.
See also #1577 which applied a similar fix to retryCommandOnFailure().
* Fix coding standards and add changelog entry
- Remove spaces around | in union catch (php-cs-fixer)
- Add CHANGELOG.md entry for #1650
* Codestlye fixes
---------
Co-authored-by: Wolfgang Kerschbaumer <wolfgang.kerschbaumer@bergfex.at>
Co-authored-by: vladvildanov <vladyslav.vildanov@redis.com>
* Add normalizeVariadic to RPUSHX and LPUSHX commands
RPUSHX and LPUSHX commands were missing the setArguments method
with normalizeVariadic call, unlike their RPUSH and LPUSH counterparts.
This caused errors when passing values as a single array argument
(e.g. $client->rpushx('key', ['val1', 'val2'])).
Fixes#1504
* Update CHANGELOG.md with RPUSHX/LPUSHX variadic fix (#1633)
* Fix variadic arguments normalization for [L|R]PUSHX
---------
Co-authored-by: Till Krüss <tillkruss@users.noreply.github.com>
* Added testing with SSL connection
* Update CHANGELOG.md
* Revert changes
* Codestyle fixes
* Add version restriction
* Fixed issue with connecting to SSL port to check redis version
* Mark tests as relay-incompatible
* Codestyle fixes
* Initial work on retries
* Added retry class and test coverage
* Added support for standalone and cluster
* Make TimeoutException instance of CommunicationException
* Added pipeline, trasnaction, replication support
* Fixed broken test
* Marked test as relay-incompatible
* Marked test as relay-incompatible
* Fixed analysis errors, added missing tests
* Codestyle fixes
* Fixed test
* Update README.md
* Update README.md
* Update README.md
* Updated README.md
* Refactor retry on read and write
* Added check for timeout value
* Updated README.md
* Fixed README.md
* Codestyle changes
* Added missing coverage
* Added missing test coverage
* Removed comments
* Added retry support for Relay connection (#1620)
* Added integration test case with mocked retry
* Changed client initialisation in tests
* Marked test as relay-incompatible
---------
Co-authored-by: Pavlo Yatsukhnenko <yatsukhnenko@users.noreply.github.com>
* Added basic structures and test coverage
* Added most of the test coverage
* Added more test coverage
* Codestyle fixes
* Fixed static analysis
* ANother static analysis fix
* Codestyle fixes
* Fixed version constraints
* Added missing annotations
* Use class context
* Added more test coverage
* Codestyle fixes
* Added experimental mentioning