205 Commits

Author SHA1 Message Date
Pavlo Yatsukhnenko d2f2a7d95e Duplicate zval before add_next_index_zval 2022-01-11 11:27:35 -08:00
Pavlo Yatsukhnenko 85dc883bab Fix RedisArray::__construct bug 2021-10-05 14:35:53 -07:00
Remi Collet b2871471ff cleanup unneeded cast 2021-10-05 14:32:16 -07:00
Remi Collet 672dec87fd Fix #1956 bad type usage on 32-bit 2021-10-05 14:32:16 -07:00
Pavlo Yatsukhnenko 99975b5924 Add accidentally removed header 2021-10-05 14:29:41 -07:00
Pavlo Yatsukhnenko 2e190adc12 Remove odd PHPREDIS_ZVAL_IS_STRICT_FALSE macro 2021-10-05 14:29:41 -07:00
Pavlo Yatsukhnenko 22b06457b6 Duplicate zval before add_next_index_zval 2021-10-05 14:29:41 -07:00
Pavlo Yatsukhnenko 1250f00013 Refactor ra_generic_del 2021-10-05 14:29:41 -07:00
Pavlo Yatsukhnenko 017b2ea7fc Refactor RedisArray 2021-10-05 14:29:41 -07:00
Pavlo Yatsukhnenko 37ed3f0796 Use zend_string in ra_find_node_by_name 2021-10-05 14:29:41 -07:00
Michael Grunder a311cc4ec3 Support for Redis 6 ACLs (#1791)
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).
2020-06-24 17:00:01 -07:00
Remi Collet b9b383f499 fix [-Wformat=] warning on 32-bit (#1750)
Use the portable `ZEND_LONG_FORMAT` family instead of C format specifiers
2020-05-06 09:46:43 -07:00
Pavlo Yatsukhnenko 35372a1f64 Authenticate in redis_sock_server_open 2020-03-30 22:34:12 +03:00
Pavlo Yatsukhnenko d5dadaf635 Add PHPREDIS_GET_OBJECT and PHPREDIS_ZVAL_GET_OBJECT macros 2020-03-09 13:36:27 +02:00
Tyson Andre 0ef488fca7 Remove "PHP Version 5" section
package.xml has a minimum version of 7.0
PHP 8.0 will probably be out in around a year.
2020-01-13 18:41:03 -05:00
Pavlo Yatsukhnenko c0db75b5ac Fix coverity scan warnings 2019-10-05 20:23:16 +03:00
Pavlo Yatsukhnenko fbe0f804bc Issue #1618
This commit fixes regression added in 112c77e3
2019-08-09 15:10:05 +03:00
Remi Collet d6fc5c7348 use uint32_t for call_user_function 2019-07-18 10:41:41 +02:00
Remi Collet b4eb158a00 ulong => zend_ulong for 7.4 2019-07-18 10:37:02 +02:00
Remi Collet 943802272a cleanup TSRMLS_* usage 2019-07-09 15:26:44 +02:00
Michael Grunder 60d8b679b3 Handle references in MGET (#1535)
Fixes #1534
2019-03-28 22:02:27 -07:00
michael-grunder 2761c607e2 Merge remote-tracking branch 'cthulhu/issue.1448-require_php7' into issue.1448-require_php7 2019-03-19 11:30:14 -07:00
Pavlo Yatsukhnenko 112c77e3a1 Issue #1508
Wrap all calls of `call_user_function` into `ra_call_user_function`
where AUTH command sended before function call.
2019-03-19 11:28:00 -07:00
Pavlo Yatsukhnenko 5053a9e7e4 RedisArray auth.
Issue #1508
2019-03-19 11:10:08 -07:00
Pavlo Yatsukhnenko 0d2dd169fa Use zend_string for storing key hashing algorithm 2019-03-19 11:09:26 -07:00
michael-grunder fa130a4bd4 PHP 7 exception and compiler warning fixes
PHP 7 removed TSRMLS_CC from zend_throw_exception* routines.
Additionally this commit creates two simple wrapper macros for throwing
Redis or RedisCluster exceptions so we don't duplicate as much code.

Additionally there were a couple of minor compiler warnings printf type
correctness fixed in this commit.
2019-02-08 21:31:47 -08:00
michael-grunder f9928642b5 PHP 5 is dead, long live PHP 7
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
2019-01-26 20:57:16 -08:00
Pavlo Yatsukhnenko 850027ffd3 Different key hashing algorithms from hash extension. 2019-01-03 16:17:20 +02:00
Pavlo Yatsukhnenko 71922bf1dd Add RedisArray::_continuum method 2018-12-22 15:31:51 +02:00
Pavlo Yatsukhnenko bb32e6f3a0 Implement consistent hashing algorithm for RedisArray 2018-12-22 15:31:51 +02:00
Pavlo Yatsukhnenko 602740d35a Use zend_string for storing RedisArray hosts 2018-12-19 10:16:54 +02:00
Michael Grunder 2c9e057236 Streams (#1413)
Streams API
2018-09-29 11:59:01 -07:00
Pavlo Yatsukhnenko 742cdd0594 Issue #1302
Handle async parameter for RedisCluster::flushDb and RedisCluster::flushAll
2018-04-22 22:26:13 +03:00
Pavlo Yatsukhnenko acd10409bc Issue #1302
Handle async parameter for RedisArray::flushDb and RedisArray::flushAll
TODO: implementation for RedisCluster and unit-tests
2018-04-22 22:26:13 +03:00
Pavlo Yatsukhnenko 1689318021 Refactor RedisArray
Add `multihost_distribute_call` function for iterating over RA hosts
and store results of functions into `return_value` array.
2018-04-11 00:03:34 +03:00
michael-grunder a4afe91909 Some style normalization 2018-02-17 09:47:28 -08:00
Pavlo Yatsukhnenko 9cd059117a Refactor RedisArray
Change type of returning value from `char *` to `zend_string *` for
`ra_extract_key` and `ra_call_extractor` functions.
Store keys as `zend_string *` in RedisArray::mset.
2018-01-29 22:37:36 +02:00
michael-grunder 04f62acbc8 Syntax fixes and prototype consolidation
Fix PHP_METHOD syntax fail for unlink
Move redis_unlink_cmd by redis_del_cmd as they're the same
2018-01-17 10:34:08 -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
Pavlo Yatsukhnenko 9d15f07adb Issue #1224 2017-10-20 16:46:05 +03:00
Pavlo Yatsukhnenko 0115666e59 Add PHPREDIS_GET_OBJECT macros 2017-10-05 15:27:18 +03:00
michael-grunder 345fc7fc9f Destroy all tabs :-) 2017-09-28 15:44:18 -07:00
Pavlo Yatsukhnenko 6a53cb99ba Revert "Fix RA memory leak"
This reverts commit 5241bcb883.
2017-09-28 22:33:31 +03:00
Pavlo Yatsukhnenko 5241bcb883 Fix RA memory leak 2017-09-28 16:53:12 +03:00
Pavlo Yatsukhnenko 3ec05496f2 Sort arginfos alphabetically 2017-09-27 10:03:32 +03:00
Pavlo Yatsukhnenko 4a0a46b4cb Check number of elements in incoming array-argument 2017-08-28 16:17:05 +03:00
Pavlo Yatsukhnenko e5660be4c6 More arginfo for RedisCluster + remove duplicates 2017-08-28 13:36:37 +03:00
Pavlo Yatsukhnenko 6c2c6faa1b More arginfo for RedisArray 2017-08-23 09:26:12 +03:00
Pavlo Yatsukhnenko 212e323f5b More arginfo for RedisArray 2017-08-22 17:23:19 +03:00
Pavlo Yatsukhnenko e23be2c830 Add arginfo for RedisArray 2017-08-22 17:11:06 +03:00