* Added a test specifically for RedisCluster to test slave failover
settings.
* Added an option to specifically disable colorization, as well as
a mechanism to determine if the output is being piped, such that
we can turn colorization off in that case as well.
* Fixed getLastError() to look at redisCluster->err, rather than flags
* Fixed serialization bug for zipstr multibulk processing
* Added specific RedisClusterTest tests for SCRIPT and EVALSHA commands
All unit tests passing now! \o/
* Updated the unit test suite to print each unit test method name we're
running as we do so, and also with fancy colors :-)
* Added functionality to handle failed transactions, where Redis will send
us a multi bulk length of -1. This can happen because of an EXECABORT
error, or because a watched key was modified during the transaction
* Initialize serialized return value to NULL to avoid segfault
* use strtol not atoi in our long response handler, to handle large values
* Fixed our return value in multi responses
* Fiexed type() command as cluster doesn't still have the '+' prefix when
checking for what TYPE returns
* Exists should return a BOOLEAN not 1/0
* Fixed sRandMember to work in the context of a MULTI block
* Use "LINDEX" not "LGET" as "LGET" isn't a valid Redis command
* Properly set our slot for the PFCOUNT command
* Many unit test changes such that Redis and RedisCluster are happy using
mostly the same ones.
* Continuing to hammer through Redis unit tests such that the
tests will work for both Redis and RedisCluster objects
* Fixed mset so we return the RedisCluster object when it's
executed in multi mode.
* Properly handle single array as well as variadic arguments for
things like RedisCluster::del
* Wrapping keys in {} such that Redis and RedisCluster tests can
use the same methods (avoiding CROSSSLOT).
* Fixed a double-free scenerio in redis_array_impl.c
This commit just backports the newer and improved multi-bulk
processing for various commands (e.g. zrange, hmget,etc) from
develop into feature/redis_cluster
Also modified getbit to treat the value as a long
It's easy to not break backward compatibility here, so I've
reintroduced logic such that INCR and DECR proper can be called
with an optional increment value, in which case the call actually
made is INCRBY or DECRBY, respectively.
This commit reworks the unit tests such that all three classes
(Redis, RedisArray, and RedisCluster) can be tested using the
TestRedis.php script.
Now, when running TestRedis.php an option can be passed for which
part of phpredis we would like to test (defaults to Redis).
When first creating the pfCount function, I simply allowed for one
string value for the key. Either Redis changed since then, or I
just missed it initially, but the PFCOUNT command can take one or
more keys.
This change doesn't break the API (in case anyone is using it under
develop now) as it can still take a single string argument, or can
take an array.
As discovered in issue #523, phpredis was attempting to unserialize
both the keys *and* scores for commands like zRangeByScore. This
had to do with the logic around deserialization in the response.
In addition, this same bug would have caused issues when running
commands like $r->config('get'), because that too, would have tried
to unserialize the values, which we don't want to do.
This commit reworks parsing and zipping up replies by allowing the
call to be configured to unseraialize any combination of keys or
values (or none or both).
This commit adds the command ZRANGEBYLEX to phpredis, which was
introduced in 2.8.9. Like with most commands, phpredis will do
some simple validation on the client side, to avoid sending
calls which are not correct (e.g. min/max that aren't valid
for the call, etc).
Addresses #498 and #465