244 Commits

Author SHA1 Message Date
Marius Meissner c8ca74d413 PHPREDIS-37: Converted global lock_release_lua_script_hash to pointer and use estrdup for filling 2017-11-02 12:41:54 +01:00
Marius Meissner abb862d2f5 PHPREDIS-37: Add locking functionality 2017-10-30 11:28:33 +01:00
Pavlo Yatsukhnenko 0b7ac2bde8 Sync package.xml and update PHP_REDIS_VERSION 2017-10-14 22:33:35 +03:00
michael-grunder 3832939df1 Prepare for 3.1.4RC1 release 2017-08-30 14:50:14 -07:00
Pavlo Yatsukhnenko 89f9c066a2 Set PHP_REDIS_VERSION to 'develop' 2017-08-04 13:17:05 +03:00
Pavlo Yatsukhnenko c760bf613e Remove PHP_RINIT and PHP_RSHUTDOWN
Since we don't do anything while request start/end we may safely remove
PHP_RINIT and PHP_RSHUTDOWN functions.
2017-06-06 22:01:38 +03:00
Pavlo Yatsukhnenko 7509636efb Merge branch 'issue.1176' into develop 2017-05-24 00:08:10 +03:00
michael-grunder bdd287e9f7 Clean up generic sort method 2017-04-27 15:18:01 -07:00
michael-grunder 029475318c Bamp 3.1.2 2017-03-16 08:57:57 -07:00
Pavlo Yatsukhnenko 9310b25ded refactoring
Change multi, pipeline and remove unused prototypes
2017-03-09 20:47:38 +02:00
Pavlo Yatsukhnenko 0c7b5f4771 Merge branch 'issue.1087' into develop 2017-03-04 19:56:36 +02:00
Pavlo Yatsukhnenko c52077b7b0 Issue #1087
`hStrLen` command
2017-03-04 19:27:31 +02:00
doodoori2 55a2a06e81 Remove dupliate header 2017-02-27 22:37:18 +09:00
michael-grunder ede43864a6 Fix version in source 2017-01-16 10:39:56 -08:00
michael-grunder 811bcc1275 Bamp 3.1.1RC1 2016-12-22 00:12:04 -08:00
michael-grunder b7aea0187c Bamp 3.1.1-rc1 2016-12-21 16:30:18 -08:00
Pavlo Yatsukhnenko 92a3a52942 release 3.1.0 2016-12-14 23:06:31 +02:00
Pavlo Yatsukhnenko ca4dc3b8c7 php7 compatibility
All tests passed. \o/
2016-11-12 20:33:45 +02:00
michael-grunder 4f49bf754a Merge commit 'edd777a6b4202580975447abfc95870572795e36' into develop 2016-06-04 09:18:18 -07:00
michael-grunder 5b26312347 Updated package.xml and proper github url 2016-06-02 20:35:49 -07:00
Remi Collet c22b58c6e3 Update version
To avoid users confusion, this is NOT a released version
And use something > last released version.
2016-01-10 17:19:31 +01:00
michael-grunder edd777a6b4 Initial support for geo commands
This commit adds initial support for the new GEO commands.
Presently the more complicated GEORADIUS[BYMEMBER] command
doesn't do much post-processing of the response, but will
probably be modified in the future to return it in a more
php friendly way.
2015-09-30 21:39:01 -07:00
michael-grunder 3491b188e0 Added a new method sAddArray to both Redis and RedisCluster
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.
2015-05-08 14:12:34 -07:00
michael-grunder 91b5a37b88 Implement rawCommand() properly, as it's not the COMMAND command in Redis. 2015-05-06 20:29:54 -07:00
michael-grunder 4b974d2873 Use win32 function prototypes for lib functions 2015-05-05 15:26:07 -07:00
michael-grunder 687a5ad64a Implements the getMode() command
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
2015-05-05 15:12:41 -07:00
michael-grunder 92f620bcad Incorporate formalized multi-bulk proessing from develop
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
2015-05-05 15:11:16 -07:00
michael-grunder 03082de7b4 COMMAND command
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.
2015-05-05 15:04:12 -07:00
michael-grunder 265837230d ZREMRANGEBYLEX
Implemented ZREMRANGEBYLEX in Redis and RedisCluster, and made the
zlexcount command generic, as it has the same semantics.
2015-05-05 15:04:12 -07:00
michael-grunder 77bcc2b2c4 ZREVRANGEBYLEX
Implemented ZREVRANGEBYLEX for Redis and RedisCluster, and made
command construction a generic that can handle either.
2015-05-05 15:04:12 -07:00
michael-grunder a85e04b2fe TIME/ROLE
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.
2015-05-05 15:04:11 -07:00
michael-grunder a4b160c4a1 ZLEXCOUNT
Implemented ZLEXCOUNT for both Redis and RedisCluster.

Removed unused variable in INFO response processor
2015-05-05 15:03:10 -07:00
michael-grunder 0c7a1ba6e8 ZRANGEBYLEX
Implemented ZRANGEBYLEX for both Redis and RedisCluster
2015-05-05 15:03:10 -07:00
michael-grunder 2451c75ed8 WATCH command
Implemented the WATCH command for RedisCluster.  This command can
take any number of keys, so phpredis splits the request across the
cluster in the best way it can.

For every key in a multiple key command, Redis Cluster requires
that they all hash to the same SLOT, else it will return a
CROSSLOT error and fail.

For WATCH in RedisCluster, a few things to note:

* The command will fail if phpredis is out of sync with the keyspace.
  This is because we'll need to know where to deliver each command,
  or can't possibly deliver them correctlhy.

* The command will fail if any command delivery failures occur on any
  node.  This is the case either for a normal communication error or
  if RedisCluster returns to us MOVED/ASK redirection.
2015-05-05 15:00:51 -07:00
michael-grunder 2b26f96f00 Some simple formatting changes
Moved our ResultCallback define to the top (before function protos)
as well as moved PHP_REDIS_VERSION define to the very top of php_redis.h
2015-05-05 14:53:43 -07:00
michael-grunder 39a8673b86 Added ZRANGE and ZREVRANGE
Implemented ZRANGE and ZREVRANGE for both Redis and cluster.
We can't use generic command processing here as the return type
depends on the optional WITHSCORES bit.

In addition, switched the code around such that zReverseRange is
an alias of zRevRange because ZREVRANGE is the actual Redis
command name.
2015-05-05 14:40:37 -07:00
michael-grunder 21f666e435 Rework no arg commands, remove non-redis method
Each of the commands that take no arguments can be reworked
such that they use the new calling convention in Redis proper

Impelemnted BITPOS

Removed Redis::resetStat.  This isn't a Redis method, but rather
an option on CONFIG, and it probably should be called that way.
2015-05-05 14:38:07 -07:00
michael-grunder 7ff8eba103 bump 2015-01-17 13:27:55 -08:00
michael-grunder 18f368f705 Bump version 2014-12-18 09:02:48 -08:00
michael-grunder 243cca9cde Merge branch 'multibulk-serialize' into develop
Conflicts:
	redis.c

References #538
2014-12-16 11:22:14 -08:00
michael-grunder bd7c0b899f Rename "command" command to "rawcommand".
Redis has actually introduced the "command" command, so it would
be confusing for phpredis to implement arbitrary command processing
as the same function name of an actual Redis command.
2014-12-09 11:01:33 -08:00
michael-grunder 3edeb29f1a Implements the getMode() command
This introspection function will inform the caller what mode phpredis
is in (atomic, pipeline, multi)
2014-11-30 12:24:44 -08:00
michael-grunder a302564c4c Fix parsing of 'zipped' replies for various uses
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).
2014-10-31 15:00:59 -07:00
michael-grunder 837e44358e Support for the "command" command.
This is a simple addition that allows a client to call any given
Redis command by sending the command name followed by a list of
arguments.

This is useful for the cases where there are new commands in Redis
that have not yet been specifically implemented in phpredis, or
if you want to use phpredis as a pass-through where the commands
and arguments are coming from somewhere else (e.g. monitor logs, etc).
2014-09-08 12:43:13 -07:00
michael-grunder b1ad5435ff ZRANGEBYLEX command
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
2014-08-30 11:45:09 -07:00
michael-grunder f78c9f4a15 Merge branch 'hotfix/debug_object' into develop 2014-07-21 12:51:01 -07:00
michael-grunder 96374a9105 Implement DEBUG OBJECT
Addresses #342
2014-07-21 12:50:29 -07:00
michael-grunder 0f1f5f444f Merge branch 'hotfix/win32-fixes' into develop
Conflicts:
	redis.c
2014-07-06 11:04:55 -07:00
vostok4 9c12c40a66 Merge nicolasff:b9a16b5ad5 in, fixing for Win32
Now we should be up to master with upstream for an easier merge.
2014-04-09 11:14:45 +02:00
michael-grunder 110a9933a3 Initial commit of HyperLogLog commands
This is the initial commit of the HyperLogLog probabilistic counting
command introduced in Redis.

Support for the following commands is implemented

  * PFADD <key> <member1> <member2> ... <memberN>
  * PFCOUNT <key>
  * PFMERGE <dstkey> <srckey1> <srckey2> ... <srckeyN>
2014-04-01 16:30:11 -07:00