108 Commits

Author SHA1 Message Date
Pavlo Yatsukhnenko
235a27e7c0 Issue #1577
Remove checking of version of msgpack.
Allow to disable json serializer.
Fix tests.
2019-06-21 11:55:13 -07:00
michael-grunder
95c8aab9df Soft deprecate methods that aren't actually Redis commands.
Addresses #1168
2019-06-16 15:58:00 -07:00
michael-grunder
19e47b4b32 Revert to using PHP's time 2019-06-16 11:44:49 -07:00
michael-grunder
9a699e5308 Try to give the EXPIREAT test a bit more leeway to succeed. 2019-06-16 11:38:45 -07:00
Pavlo Yatsukhnenko
4852a5106a xInfo response format 2019-06-12 12:20:38 +03:00
michael-grunder
0c17bd27a0 Make the XREADGROUP optional COUNT and BLOCK arguments nullable.
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
2019-06-04 13:37:52 -07:00
michael-grunder
6e49417068 Allow PING to take an optional argument.
Addresses #1563
2019-06-03 07:53:21 -07:00
Michael Grunder
19f3efcfe6 Issue.1555 zrange withscores arg (#1565)
Allows ZRANGE to be called either with `true` or `['withscores' => true]` so it's consistent with `ZRANGEBYSCORE` but also backward compatible.

Fixes #1555
2019-06-02 17:44:26 -07:00
michael-grunder
5cb30fb2a6 Adds OPT_REPLY_LITERAL for rawCommand and EVAL
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
2019-05-13 09:38:18 -07:00
Pavlo Yatsukhnenko
98bd2886c3 JSON serializer 2019-05-12 15:30:47 +03:00
michael-grunder
d7450b2f59 Add support for STREAM to the type command 2019-04-16 08:16:12 -07:00
B. Gortney
d5b8f83340 rebase msgpack pull request (#801) on develop branch 2019-03-23 16:55:43 +02:00
michael-grunder
eb81b9153c Merge branch 'issue-1509' into issue.1448-require_php7 2019-02-23 17:41:19 -08:00
michael-grunder
f89e941a88 Change ZPOP* return type and implement blocking variants
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.
2019-02-18 20:00:08 -08:00
Marin Bezhanov
46f035615e Add ZPOPMAX and ZPOPMIN support 2019-02-17 13:05:58 +02:00
michael-grunder
85419ce7d3 Merge branch 'issue.1502.geo-readonly-cmds' into issue.1448-require_php7 2019-02-14 10:21:00 -08:00
michael-grunder
22d81a94ee Implement GEORADIUS_RO and GEORADIUSBYMEMBER_RO
This addresses #1502, #1487
2019-02-13 13:07:35 -08:00
michael-grunder
9440f05e19 Switch everything to new array syntax 2019-02-09 14:12:52 -08:00
Michael Grunder
15995c06e3 Xgroup updates (#1499)
Adds support for XGROUP CREATE ... MKSTREAM, and support at all for XGROUP DESTROY.
2019-01-24 08:36:58 -08:00
Pavlo Yatsukhnenko
018ec177a7 Add testDiscard 2019-01-10 21:55:57 +02:00
michael-grunder
7b8b7b01a2 Fix unit tests for Redis 5.0.2
Addresses issue #1472
2018-12-08 15:11:12 -08:00
Michael Grunder
91bd7426d5 Masters info leakfix (#1462)
Fix for memory leaks in `RedisCluster->_masters()` and `RedisCluster->info()`
2018-11-22 11:37:18 -08:00
michael-grunder
2e412373c4 Use a ZSET insted of SET for EVAL tests
Redis SET type is unordered which could break our eval tests
so use a ZSET instead where the order is deterministic.
2018-10-12 08:36:48 -07:00
Remi Collet
0af2a7fe06 missing space between command and args 2018-10-12 00:24:16 -07:00
Michael Grunder
2c9e057236 Streams (#1413)
Streams API
2018-09-29 11:59:01 -07:00
michael-grunder
bfd274712e Modify session testing logic
In the event that the test PHP executable has been built with redis
and/or igbinary support built statically, we don't need to try and
find it by adding --no-php-ini and the extension directives themselves.

This fixes the test execution when php has the required extensions
already.
2018-09-20 22:23:40 -07:00
michael-grunder
d4a086979f Allow '-' and '+' arguments and add tests for zLexCount and zRemRangeByLex 2018-09-18 17:00:21 -07:00
Pavlo Yatsukhnenko
fa5f6e1411 Merge pull request #1365 from remicollet/issue-runcmd
use PHP_BINARY instead of php and allow override
2018-06-08 17:56:41 +03:00
Remi Collet
ff32a63415 Fix: Warning: time() expects exactly 0 parameters, 1 given ... (php 7.3) 2018-06-08 16:16:53 +02:00
Remi Collet
c4e4248dbe use PHP_BINARY instead of php and allow override
honours TEST_PHP_EXECUTABLE and TEST_PHP_ARGS (as standard php tests)
2018-06-08 16:02:36 +02:00
Marius Meissner
d0cada2268 PHPREDIS-1354: Refactored tests to work also with Redis cluster 2018-06-06 09:55:50 +02:00
Marius Meissner
21436f61dd PHPREDIS-1354: Added session lifetime parameter for reading session data 2018-05-23 12:13:13 +02:00
Marius Meissner
e2d5b5ea49 PHPREDIS-1354: Added session TTL tests 2018-05-22 17:24:47 +02:00
michael-grunder
368975bc30 Remove debug code! :) 2018-04-10 12:07:06 -07:00
michael-grunder
411b6aa5b1 Adds STORE and STOREDIST to GEORADIUS[BYMEMBER]
* Adds the STORE and STOREDIST options to GEORADIUS[BYMEMBER] for
  both Redis and RedisCluster classes.  We attempt to protect the
  caller from CROSSLOT errors on the client side so as to make it
  obvious when that is happening.

* Created a struct to carry around GEORADIUS options as there are
  now two more and there were already a lot.

* Moved the structs/enums to handle GEORADIUS into the source file
  instead of header as they aren't needed outside of redis_commands.c
2018-04-10 12:07:06 -07:00
michael-grunder
dba618a1e0 Use uniqid() 2018-04-10 12:06:36 -07:00
michael-grunder
e599ecf186 Fallback if we don't have openssl 2018-04-10 12:06:36 -07:00
Pavlo Yatsukhnenko
300c72510c Merge branch 'session-locking' into develop
Conflicts:
	redis_session.c
	tests/RedisTest.php
2018-03-24 17:45:51 +02:00
Marius Meissner
517644a276 Fixed failing Travis builds caused by missing session handler interface on PHP < 5.4 2018-03-01 12:53:38 +01:00
Marius Meissner
1fb97aa511 Removed background operator, which could lead to race conditions 2018-03-01 12:47:46 +01:00
Marius Meissner
948e4b8dc3 Added tests for using session proxy handler 2018-03-01 11:30:24 +01:00
Marius Meissner
d8a44723b5 Removed unused variables + added assertion if session key changed 2018-03-01 11:14:38 +01:00
Remi Collet
627bd89b45 skip online test 2018-02-08 05:47:28 +01:00
michael-grunder
2828c2f187 Merge branch 'issue.1287' into develop 2018-01-25 10:59:40 -08:00
michael-grunder
625fadeb51 Merge branch 'swapdb-command' into develop 2018-01-18 17:38:09 -08:00
michael-grunder
03f77018ce Add a test for SWAPDB 2018-01-18 11:01:53 -08:00
michael-grunder
84f1f28ba2 Implement SWAPDB command 2018-01-18 09:04:25 -08:00
michael-grunder
9e65c42931 Implement UNLINK command
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.
2018-01-17 09:36:38 -08:00
michael-grunder
815d2013b4 Much simpler exception test 2018-01-12 09:01:06 -08:00
michael-grunder
4090af15b8 Adds a test for throwing a connect exception 2018-01-11 19:29:14 -08:00