1034 Commits

Author SHA1 Message Date
michael-grunder
c0ac9ca55c bump 2.2.7 2015-01-17 13:28:13 -08:00
michael-grunder
3e13a1f514 Merge branch 'develop'
Conflicts:
	php_redis.h
2015-01-17 13:26:23 -08:00
Atsuji Okuyama
c702ae01dc forgot to pass TSRMLS_CC, and TYPO 2015-01-14 18:46:44 -08:00
michael-grunder
18f368f705 Bump version 2.2.6 2014-12-18 09:02:48 -08:00
michael-grunder
2336477e10 Allow for pfcount to take multiple keys
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.
2014-12-17 17:42:08 -08:00
michael-grunder
590c753bc1 Capture error for multibulk responses
Addresses #540
2014-12-17 12:35:07 -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
95ca34b712 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.

Conflicts:
	php_redis.h
2014-12-09 11:03:50 -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
81383b200b 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-12-09 10:58:57 -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
6f75b0ea74 Allow for subscribe callback to return any value
This commit changes the behaviour of the various subscribe flavors
such that the callback can break the loop by returning any non-null
value.

This would allow, for example, context to be retreived from the message
and then used in such a way to return it to the caller.
2014-11-14 11:44:46 -08:00
michael-grunder
b635f62819 Remove commented code 2014-10-31 15:10:37 -07: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
e8ad58b97b Merge branch 'errorthrow' into develop 2014-10-29 10:14:54 -07:00
michael-grunder
346e4d43cd Re-add % signs accidentally deleted 2014-10-29 10:00:04 -07:00
michael-grunder
24f7585451 Modify error handling for specific errors, and reathorize when reconnecting.
For certain error types (Redis LOADING the dataset, SYNC in progress/master down,
and AUTH failures) it may be prudent to throw an exception rather than simply
return false.

In addition, this commit adds logic to reauthorize the connection in the event of
a reconnect (for whatever reason).

Addresses #515
2014-10-27 21:55:01 -07:00
michael-grunder
da51f06bcd Merge branch 'int-ra-timeout' into develop 2014-10-22 13:52:52 -07:00
michael-grunder
c1f862c99d Remove debug line 2014-10-22 13:52:31 -07:00
michael-grunder
66cdeb6b59 Allow integer connect_timeout in RedisArray
Addresses #520
2014-10-20 12:20:57 -07:00
Remi Collet
0c4ddd90a6 Fix segfault with igbinary, fix #341 2014-10-04 07:19:14 -07:00
Remi Collet
6c6299cb0d Fix segfault with igbinary, fix #341 2014-10-04 07:19:07 -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
ebb354193a Fixes a memory leak in SCAN, with OPT_SCAN_RETRY enabled.
When you instruct phpredis to retry the scan command in the event
of a non zero iterator but zero elements being returned, it was
leaking memory, as it did not free the previous result.

Addresses #501
2014-09-02 12:29:26 -07:00
michael-grunder
4c1f1bcaa2 Fixes a memory leak in SCAN, with OPT_SCAN_RETRY enabled.
When you instruct phpredis to retry the scan command in the event
of a non zero iterator but zero elements being returned, it was
leaking memory, as it did not free the previous result.

Addresses #501
2014-09-02 12:27:28 -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
c610cec90b Merge branch 'feature/break_sub_loop' into develop 2014-08-04 08:45:24 -07:00
michael-grunder
273dd8fcad Break out of subscribe loop
* Modified @isage pull request slightly for OCD reasons.
* Fixed an old memory leak in subscribe.

Related to #493
2014-08-04 08:44:51 -07:00
iSage
78f4f50c2d Allow to break out of subscribe loop 2014-08-04 08:28:53 -07:00
michael-grunder
f78c9f4a15 Merge branch 'hotfix/debug_object' into develop 2014-07-21 12:51:01 -07:00
michael-grunder
94e064940c Merge branch 'hotfix/debug_object' debug_object 2014-07-21 12:50:52 -07:00
michael-grunder
96374a9105 Implement DEBUG OBJECT
Addresses #342
2014-07-21 12:50:29 -07:00
michael-grunder
ba4a21a5d5 Fix compiler error 2014-07-06 11:07:41 -07:00
michael-grunder
0f1f5f444f Merge branch 'hotfix/win32-fixes' into develop
Conflicts:
	redis.c
2014-07-06 11:04:55 -07:00
michael-grunder
6d14bf5355 Merge branch 'hotfix/win32-fixes' win32-fixes 2014-07-06 10:59:37 -07:00
michael-grunder
fb10a14b7c config.h shouldn't be in the repo 2014-07-06 10:59:21 -07:00
michael-grunder
7a80c10905 Remove duplicate pubsub test 2014-07-06 10:58:22 -07:00
Anatol Belski
e223916eb4 cleanup config.w32 2014-07-04 10:05:54 +02:00
Anatol Belski
cdd4557f01 fix unreferenced variable warnings 2014-07-01 16:59:41 +02:00
Anatol Belski
79efa8d791 fixes after the merge 2014-07-01 16:50:23 +02:00
Anatol Belski
4d2533706a Merge remote-tracking branch 'vostok4/master'
Conflicts:
	CREDITS
	README.markdown
	config.w32
	library.c
	library.h
	package.xml
	redis.c
	redis_array.c
	redis_array.h
	redis_array_impl.c
	redis_array_impl.h
	tests/TestRedis.php
2014-07-01 16:45:09 +02:00
Anatol Belski
48138096da reworked config.w32 2014-07-01 14:00:36 +02:00
Anatol Belski
3880c9eb9e fix CREDITS for resource compilation to work
see also CREDITS in other exts for the correct format
2014-07-01 12:37:11 +02:00
Anatol Belski
6c377eee18 added redis array stuff to win part done some fixes to it 2014-07-01 12:19:01 +02:00
Anatol Belski
0303e1594b C89 compat for session 2014-07-01 12:01:27 +02:00
Anatol Belski
3f9d0f7192 more C89 compat 2014-07-01 11:58:35 +02:00
Anatol Belski
7194e31fe9 fix stdint usage 2014-07-01 11:50:36 +02:00
Anatol Belski
1fdefc2755 atoll vs _atoi64 2014-07-01 11:45:41 +02:00
Anatol Belski
00be281e1b C89 compat 2014-07-01 11:41:55 +02:00
Anatol Belski
792a71da73 fixed prototype 2014-07-01 11:33:23 +02:00