Implement VEMB and slightly rework VINFO

Unfortunately `VEMB` has a unique `RESP2` reply as far as I can tell,
where it sends the embedding mode (int8, bin, fp32) as a simple string.

This would cause any of PhpRedis' generic reply handlers to turn that
into `true` which isn't useful. For that reason we need a custom reply
handler.

Additionally slightly rework `VINFO` to short circuit and return failure
if we read anything other than a bulk string or an integer reply type.
Otherwise we may get out of sync on the socket.

See #2543
This commit is contained in:
michael-grunder
2025-07-31 12:50:29 -07:00
committed by Michael Grunder
parent 8f8a49bec2
commit 96378b70fd
13 changed files with 194 additions and 15 deletions

View File

@@ -1088,6 +1088,11 @@ class RedisCluster {
*/
public function vinfo(string $key): RedisCluster|array|false;
/**
* @see Redis::vemb
*/
public function vemb(string $key, mixed $member, bool $raw = false): RedisCluster|array|false;
/**
* @see Redis::xack
*/