3294 Commits

Author SHA1 Message Date
michael-grunder
ae3bc505a2 Fix shellcheck warnings 2022-12-11 15:42:54 -08:00
michael-grunder
856b3509f5 PHP 8.2 is now released. 2022-12-10 16:22:17 -08:00
michael-grunder
59de183bd4 Use Get-ChildItem instead of a hardcoded path for php_relay.dll 2022-12-10 15:08:31 -08:00
Michael Grunder
ac057145fc Build windows artifacts as part of CI (#2295)
Build windows artifacts as part of CI

See: #2291
2022-12-10 13:08:50 -08:00
michael-grunder
5b560ccfd7 Refactor a couple more command methods.
Use the new argument parsing API
2022-12-10 12:00:32 -08:00
michael-grunder
15347c7d87 Fix CodeQL confusion. 2022-12-10 12:00:09 -08:00
michael-grunder
aa0938a4e2 Rework ZRANGE argument handling.
Rework argument parsing for `ZRANGE` so we can pass either a string or
an integer so everything will work even when using strict types.

Additionally update our docs to use the correct mechanism for adding
the `BYSCORE` option.

Fixes #2291
2022-12-10 12:00:09 -08:00
michael-grunder
204a02c5fa Refactor SMOVE command. 2022-12-10 11:58:32 -08:00
michael-grunder
19fd7e0c00 Refactor PFCOUNT command. 2022-12-10 11:58:08 -08:00
michael-grunder
90eb04709a Refactor HMSET command. 2022-12-10 11:57:42 -08:00
michael-grunder
6d10448109 Refactor MSET and MSETNX commands.
Switch to using our normal command handling logic for MSET and MSETNX.
2022-12-10 11:57:24 -08:00
michael-grunder
3574ef0867 Refactor INFO and SCRIPT commands.
Use `gen_varkey_cmd` for INFO and SCRIPT.
2022-12-10 11:45:08 -08:00
michael-grunder
8cb6dd17fe Refactor MGET command. 2022-12-07 11:18:25 -08:00
michael-grunder
121d330c16 Remove min_argc indirection all together.
Given how `gen_varkey_cmd` is called, we can actually derive the
`min_argc` from whether or not it has a timeout.
2022-12-07 11:18:08 -08:00
michael-grunder
4264940e52 Parentheses. 2022-12-07 11:18:08 -08:00
michael-grunder
486f131f44 Clearer logic for checking if we have a single array. 2022-12-07 11:18:08 -08:00
michael-grunder
3efa59cbc1 Refactor gen_varkey_cmd
Use the new argument parsing API which lets us avoid an allocation
and switch to redis_cmd_append_sstr_key_zval to abstract away key
prefixing logic.
2022-12-07 11:18:08 -08:00
michael-grunder
acb5db7661 Refactor OBJECT command. 2022-12-06 12:42:29 -08:00
michael-grunder
e90557c832 Silence CodeQL false positive. 2022-12-06 10:46:32 -08:00
michael-grunder
f62363c2a3 Refactor SRANDMEMBER command. 2022-12-06 10:46:32 -08:00
michael-grunder
86f15ccaa1 Refactor SELECT command.
* Use our common command handler logic for SELECT.

* Shift updating `redis_sock->dbNumber` from the command itself to the
  reply handler, so we aren't erroneously pointing to a non-existent
  database before the command succeeds.
2022-12-06 10:46:17 -08:00
zorro-fr24
b6cf6361dd Add cluster support for strict sessions and lazy write
* Add ini setting redis.session.early_refresh to allow for session TTL updates on session start ( requires redis server version 6.2 or greater )
 * Enable cluster session support for strict mode sessions ( via PS_VALIDATE_SID_FUNC )
 * Cluster sessions used to write on every session, now we only write if the session has been modified.
 * Send EXPIRE instead of SETEX if sessioh has not been changed
 * If early refresh is enabled use GETEX for initial session read
 * When strict sessions are enabled, check whether the session exists first, validate sid and regenerate if necessary
2022-12-06 10:45:52 -08:00
michael-grunder
79c9d2241f Refactor rawCommand and WAIT 2022-12-03 23:32:24 -08:00
michael-grunder
5bcaaa59c5 Badge links are broken.
[skip ci]
2022-12-03 20:18:30 -08:00
michael-grunder
27900f39d2 Implement new ZSET commands for cluster
* Implement `ZDIFF`, `ZINTER`, `ZUNION`, `ZMSCORE`, and
  `ZRANDMEMBER` for `RedisCluster`.
* Refactor `ZUNIONSTORE` command and switch to using our centralized
  zset option parsing handler.

See #1894
2022-12-02 09:11:00 -08:00
michael-grunder
40a2c254e2 Implement COPY for RedisCluster
* Refactor `redis_copy_cmd` to use the new argument parsing macros.
* Add a handler in `RedisCluster`.

See #1894
2022-12-01 22:38:19 -08:00
michael-grunder
e222b85ecf Implement HRANDFIELD for RedisCluster
See #1894
2022-12-01 22:12:19 -08:00
Michael Grunder
fa5d1af9ff Implement GEOSEARCH and GEOSEARCHSTORE for RedisCluster. (#2277)
* Implement GEOSEARCH and GEOSEARCHSTORE for RedisCluster.

See #1894
2022-12-01 21:54:15 -08:00
michael-grunder
7121aaae5c Implement LPOS for RedisCluster
See #1894
2022-12-01 14:05:43 -08:00
michael-grunder
121e9d9c29 Implement BLMOVE and add LMOVE/BLMOVE to cluster.
* Refactor `redis_lmove_cmd` to work for both `LMOVE` and `BLMOVE`
* Implement `LMOVE` and `BLMOVE` in RedisCluster.

See #1894
2022-12-01 13:48:03 -08:00
Pavlo Yatsukhnenko
b1d78f3cda Merge pull request #2263 from phpredis/issue-2068-spubsub
Issue #2068, ssubscribe/sunsubscribe
2022-12-01 22:30:00 +02:00
Pavlo Yatsukhnenko
7644736e13 Issue #2068, ssubscribe/sunsubscribe 2022-12-01 22:19:15 +02:00
Michael Grunder
4b6e9be030 Merge pull request #2270 from phpredis/cluster-smismember-cmd
Implement SMISMEMBER for RedisCluster
2022-12-01 09:39:18 -08:00
michael-grunder
abfac47be0 Implement SMISMEMBER for RedisCluster
See #1894
2022-11-30 17:55:30 -08:00
michael-grunder
7a4cee2d66 Review changes
See #2106
2022-11-25 13:41:47 -08:00
michael-grunder
90828019de Refactor network IO tracking.
* Create inline wrappers of the low-level php_stream_* functions that
  also keep track of the number of bytes written/read.

* Change the logic to aggregate network traffic until the user
  explicitly "resets" it.  I think this will be a more common use-case
  (running many commands and then seeing overall network IO).

See #2106
2022-11-25 13:41:47 -08:00
michael-grunder
2a6dee5d4d Use PHP's new class constant mechanism.
Let gen_stub.php define the constants for us, including deriving their
actual values from C defines.

As a side-effect we have to drop support for PHP < 7.2 as it does not
have interned strings.
2022-11-24 09:26:44 -08:00
michael-grunder
b580505b40 Add a link to my Mastodon profile.
[skip ci]
2022-11-20 13:01:44 -08:00
Pavlo Yatsukhnenko
91eaf209cd Merge pull request #2257 from phpredis/issue-2068-command
Refactor `command` command
2022-11-19 20:54:23 +02:00
Pavlo Yatsukhnenko
ff863f3f97 Refactor command command
Issue #2068
2022-11-19 14:04:38 +02:00
michael-grunder
872b69313b Documentation: Normalize formatting. 2022-11-18 00:02:16 -08:00
michael-grunder
0243dd9d2a SENTINEL RESET returns a long. 2022-11-17 22:35:18 -08:00
michael-grunder
72f8eb2565 Documentation: Rebuild docs. 2022-11-16 12:13:50 -08:00
michael-grunder
0b7bd83f57 Add more docblocks and fix XAUTOCLAIM response handler.
- Finish adding docblocks with examples for all of the stream commands.
- Fix XAUTOCLAIM response handler (the reply has a slightly different
  structure to XCLAIM.
2022-11-15 23:29:45 -08:00
michael-grunder
c14a9e3a01 Documentation: Normalize examples. 2022-11-15 18:16:57 -08:00
michael-grunder
53d142d93a Documentation: Add more docblocks and fix up formatting. 2022-11-15 15:09:24 -08:00
michael-grunder
2d365ee2ad Documentation: Format docs and add remaining GEO* docblocks 2022-11-15 11:26:29 -08:00
michael-grunder
ef4699c726 Documentation: Rework more formatting and add example sections.
[skip ci]
2022-11-10 19:36:06 -08:00
Michael Grunder
65c965638c Add a link to our WIP API docs. (#2252) 2022-11-10 12:06:35 -08:00
michael-grunder
ecf6514400 Documentation: Render docs 2022-11-09 19:26:10 -08:00