This commit splits compression and serialization into two distinct parts
and adds some utility functions so the user can compress/uncompress
or pack/unpack data explicily.
See #1939
Rework the session locking unit tests to be less reliant on arbitrary
sleep calls which can be very troublesome when running in Travis and
especially when running in Travis under valgrind.
Additionally, skip multiple newly added Redis 6.2 commands that aren't
yet implemented in RedisCluster.
Rework the session locking unit tests to be less reliant on arbitrary
sleep calls which can be very troublesome when running in Travis and
especially when running in Travis under valgrind.
ZSTD uses two defined error numbers to inform the caller when the
compressed data is invalid (e.g. wrong magic number) or the size is
unknown.
We should always know the size so abort if ZSTD returns either to us.
Fixes: #1936
Fix for #1847 when dealing with NULL multi bulk replies in RedisCluster.
Adds `Redis::OPT_NULL_MULTIBULK_AS_NULL` setting to have PhpRedis
treat NULL multi bulk replies as `NULL` instead of `[]`.
Co-authored-by: Alex Offshore <offshore@aopdg.ru>
Add support for Redis 6 ACLs in the `Redis`, `RedisCluster`, and `RedisArray` classes.
On a related note, it adds a mechanism for users to customize how we generate persistent connection IDs such that they can be grouped in different ways depending on the specific use case required (e.g. it would allow connections to be grouped by username, or by user-defined persistent_id, or both).
Right now cloning the repo and running unit tests will all fail if the
Redis/RedisCluster instances aren't configured with the password
'phpredis'.
This commit simply makes authentication during the tests optional via a
command-line argument.
I our test suite we were only checking if an exception was an instance
of `RedisException` and marking the test 'SKIPPED' if not. This was
masking a failure in the RedisCluster test for testMultiExec by showing
it as skipped when it was actually throwing an exception (not being able
to execute the MULTI across the cluster).
Change the way we accept COUNT and BLOCK such that a user can pass NULL
to mean "no value". This is technically a breaking change, since
previously the value `-1` was used for "no value".
Fixes#1560
Allows ZRANGE to be called either with `true` or `['withscores' => true]` so it's consistent with `ZRANGEBYSCORE` but also backward compatible.
Fixes#1555
Adds an option to process the actual strings in simple string replies as
opposed to translating them to `true`. This only applies to
`rawCommand` and `eval` because as far as I know know vanilla Redis
command attaches any information besides `OK` to simple string replies.
Addresses #1550
This commit updates ZPOPMIN/ZPOPMAX to return the same format that
zRange WITHSCORES and zRangeByScore WITHSCORES does.
In addition the blocking variants BZPOPMIN and BZPOPMAX are implemented.