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
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).
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.
This commit removes support for PHP 5 by getting rid of all of our Zend
compatibility layer methods, as well as any call checking against
PHP_MAJOR_VERSION or ZEND_MODULE_API_NO.
Unit tests are all passing for Redis, RedisCluster, and RedisArray but
this should still be considered a work in progress until more testing
can be done.
Addresses issue #1448
This commit implements UNLINK for Redis, RedisCluster, and RedisArray.
To a client library UNLINK behaves identically to DEL so we can use the
same handlers for both.
Presently, the sAdd command is variadic, meaning that it takes a key
and then 1 to N additional arguments for the members being added. We
need to keep this functionality to avoid breaking existing code,
but there are good performance and other reasons to have an sAdd
command which takes a key followed by an array of members, which is
what the sAddArray method implements.
Rename command to rawCommand() as it's named in phpredis proper
This introspection function will inform the caller what mode phpredis
is in (atomic, pipeline, multi)
Conflicts:
php_redis.h
We may want to configure phpredis such that it will attempt to fall back
to a given master's slave, if the master were to go down (and the command
is read only).
For certain commands that need to be directed at a node
(CONFIG, CLIENT, SCRIPT, etc), the syntax can be complicated
and highly variant. For this reason, these remaining commands
have been implemented in a generic way, where users will rely
on the error message from Redis to figure out what went wrong.
All of the commands take our standardized "node" argument which
can either take the form of a string key, or Array(host, port).
Implement the new COMMAND command in Redis for both cluster and
non cluster classes. This command is really more of a debug tool
but should actually be useful for updating the unit tests as we
can now simply detect which commands do and don't exist, etc.
Implemented the ECHO command for cluster, which like other commands
where you send to a specific node, can be done either by sending
"at" a key, or by sending to a host/port
Implemented ROLE and TIME commands in RedisCluster, as well as
updated the TIME command for Redis proper such that we use the
new calling convention.
Updated redis_read_variant_reply to take a context void* so it
conforms with the correct prototype.
This commit implements the INFO command for RedisCluster, which
behaves like other direct to node commands and can take either
a key or a host and port.
Updated cluster_send_slot function such that on success it sets
the proper reply slot.