From e4b5d5718d0aaa71c2999ada1f8a08fbe560f831 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 27 Jul 2025 16:03:58 +0000 Subject: [PATCH] Version v0.14.0-dev --- VERSION | 2 +- vendor/autoload.php | 5 +- vendor/composer/InstalledVersions.php | 45 +++++++++- vendor/composer/autoload_psr4.php | 4 +- vendor/composer/autoload_static.php | 8 +- vendor/composer/installed.json | 14 +-- vendor/composer/installed.php | 10 +-- vendor/composer/platform_check.php | 5 +- vendor/predis/predis/README.md | 44 +++++++++ vendor/predis/predis/src/Client.php | 2 +- .../predis/src/ClientContextInterface.php | 25 ++++++ vendor/predis/predis/src/ClientInterface.php | 18 +++- .../predis/src/Command/PrefixableCommand.php | 4 +- .../predis/predis/src/Command/Redis/BITOP.php | 10 +++ .../src/Command/Redis/BloomFilter/BFADD.php | 7 +- .../Command/Redis/BloomFilter/BFEXISTS.php | 7 +- .../src/Command/Redis/BloomFilter/BFINFO.php | 7 +- .../Command/Redis/BloomFilter/BFINSERT.php | 7 +- .../Command/Redis/BloomFilter/BFLOADCHUNK.php | 7 +- .../src/Command/Redis/BloomFilter/BFMADD.php | 7 +- .../Command/Redis/BloomFilter/BFMEXISTS.php | 7 +- .../Command/Redis/BloomFilter/BFRESERVE.php | 7 +- .../Command/Redis/BloomFilter/BFSCANDUMP.php | 7 +- .../Redis/CountMinSketch/CMSINCRBY.php | 7 +- .../Command/Redis/CountMinSketch/CMSINFO.php | 7 +- .../Redis/CountMinSketch/CMSINITBYDIM.php | 7 +- .../Redis/CountMinSketch/CMSINITBYPROB.php | 7 +- .../Command/Redis/CountMinSketch/CMSMERGE.php | 15 +++- .../Command/Redis/CountMinSketch/CMSQUERY.php | 7 +- .../src/Command/Redis/CuckooFilter/CFADD.php | 7 +- .../Command/Redis/CuckooFilter/CFADDNX.php | 7 +- .../Command/Redis/CuckooFilter/CFCOUNT.php | 7 +- .../src/Command/Redis/CuckooFilter/CFDEL.php | 7 +- .../Command/Redis/CuckooFilter/CFEXISTS.php | 7 +- .../src/Command/Redis/CuckooFilter/CFINFO.php | 7 +- .../Command/Redis/CuckooFilter/CFINSERT.php | 7 +- .../Redis/CuckooFilter/CFLOADCHUNK.php | 7 +- .../Command/Redis/CuckooFilter/CFMEXISTS.php | 7 +- .../Command/Redis/CuckooFilter/CFRESERVE.php | 7 +- .../Command/Redis/CuckooFilter/CFSCANDUMP.php | 7 +- .../predis/src/Command/Redis/EXPIRETIME.php | 7 +- .../predis/src/Command/Redis/GEOSEARCH.php | 7 +- .../predis/src/Command/Redis/GETDEL.php | 7 +- .../src/Command/Redis/Json/JSONARRAPPEND.php | 7 +- .../src/Command/Redis/Json/JSONARRINDEX.php | 7 +- .../src/Command/Redis/Json/JSONARRINSERT.php | 7 +- .../src/Command/Redis/Json/JSONARRLEN.php | 7 +- .../src/Command/Redis/Json/JSONARRPOP.php | 7 +- .../src/Command/Redis/Json/JSONARRTRIM.php | 7 +- .../src/Command/Redis/Json/JSONCLEAR.php | 7 +- .../predis/src/Command/Redis/Json/JSONDEL.php | 7 +- .../src/Command/Redis/Json/JSONFORGET.php | 7 +- .../predis/src/Command/Redis/Json/JSONGET.php | 7 +- .../src/Command/Redis/Json/JSONMERGE.php | 7 +- .../src/Command/Redis/Json/JSONMGET.php | 7 +- .../src/Command/Redis/Json/JSONMSET.php | 13 ++- .../src/Command/Redis/Json/JSONNUMINCRBY.php | 7 +- .../src/Command/Redis/Json/JSONOBJKEYS.php | 7 +- .../src/Command/Redis/Json/JSONOBJLEN.php | 7 +- .../src/Command/Redis/Json/JSONRESP.php | 7 +- .../predis/src/Command/Redis/Json/JSONSET.php | 7 +- .../src/Command/Redis/Json/JSONSTRAPPEND.php | 7 +- .../src/Command/Redis/Json/JSONSTRLEN.php | 7 +- .../src/Command/Redis/Json/JSONTOGGLE.php | 7 +- .../src/Command/Redis/Json/JSONTYPE.php | 7 +- .../predis/predis/src/Command/Redis/LMOVE.php | 12 ++- .../predis/src/Command/Redis/SMISMEMBER.php | 7 +- .../src/Command/Redis/Search/FTAGGREGATE.php | 7 +- .../src/Command/Redis/Search/FTALIASADD.php | 7 +- .../src/Command/Redis/Search/FTALIASDEL.php | 7 +- .../Command/Redis/Search/FTALIASUPDATE.php | 7 +- .../src/Command/Redis/Search/FTALTER.php | 7 +- .../src/Command/Redis/Search/FTCREATE.php | 7 +- .../src/Command/Redis/Search/FTCURSOR.php | 7 +- .../src/Command/Redis/Search/FTDICTADD.php | 7 +- .../src/Command/Redis/Search/FTDICTDEL.php | 7 +- .../src/Command/Redis/Search/FTDICTDUMP.php | 7 +- .../src/Command/Redis/Search/FTDROPINDEX.php | 7 +- .../src/Command/Redis/Search/FTEXPLAIN.php | 7 +- .../src/Command/Redis/Search/FTINFO.php | 7 +- .../src/Command/Redis/Search/FTPROFILE.php | 7 +- .../src/Command/Redis/Search/FTSEARCH.php | 7 +- .../src/Command/Redis/Search/FTSPELLCHECK.php | 7 +- .../src/Command/Redis/Search/FTSYNDUMP.php | 7 +- .../src/Command/Redis/Search/FTSYNUPDATE.php | 7 +- .../src/Command/Redis/Search/FTTAGVALS.php | 7 +- .../src/Command/Redis/TDigest/TDIGESTADD.php | 7 +- .../Command/Redis/TDigest/TDIGESTBYRANK.php | 7 +- .../Redis/TDigest/TDIGESTBYREVRANK.php | 7 +- .../src/Command/Redis/TDigest/TDIGESTCDF.php | 7 +- .../Command/Redis/TDigest/TDIGESTCREATE.php | 7 +- .../src/Command/Redis/TDigest/TDIGESTINFO.php | 7 +- .../src/Command/Redis/TDigest/TDIGESTMAX.php | 7 +- .../Command/Redis/TDigest/TDIGESTMERGE.php | 15 +++- .../src/Command/Redis/TDigest/TDIGESTMIN.php | 7 +- .../Command/Redis/TDigest/TDIGESTQUANTILE.php | 7 +- .../src/Command/Redis/TDigest/TDIGESTRANK.php | 7 +- .../Command/Redis/TDigest/TDIGESTRESET.php | 7 +- .../Command/Redis/TDigest/TDIGESTREVRANK.php | 7 +- .../Redis/TDigest/TDIGESTTRIMMED_MEAN.php | 7 +- .../src/Command/Redis/TimeSeries/TSADD.php | 7 +- .../src/Command/Redis/TimeSeries/TSALTER.php | 7 +- .../src/Command/Redis/TimeSeries/TSCREATE.php | 7 +- .../Command/Redis/TimeSeries/TSCREATERULE.php | 12 ++- .../src/Command/Redis/TimeSeries/TSDECRBY.php | 7 +- .../src/Command/Redis/TimeSeries/TSDEL.php | 7 +- .../Command/Redis/TimeSeries/TSDELETERULE.php | 7 +- .../src/Command/Redis/TimeSeries/TSGET.php | 7 +- .../src/Command/Redis/TimeSeries/TSINCRBY.php | 7 +- .../src/Command/Redis/TimeSeries/TSINFO.php | 7 +- .../src/Command/Redis/TimeSeries/TSMADD.php | 13 ++- .../src/Command/Redis/TimeSeries/TSRANGE.php | 7 +- .../predis/src/Command/Redis/TopK/TOPKADD.php | 7 +- .../src/Command/Redis/TopK/TOPKINCRBY.php | 7 +- .../src/Command/Redis/TopK/TOPKINFO.php | 7 +- .../src/Command/Redis/TopK/TOPKLIST.php | 7 +- .../src/Command/Redis/TopK/TOPKQUERY.php | 7 +- .../src/Command/Redis/TopK/TOPKRESERVE.php | 7 +- .../Command/Redis/Utils/CommandUtility.php | 56 ++++++++++++ .../src/Command/Redis/Utils/VectorUtility.php | 40 +++++++++ .../predis/predis/src/Command/Redis/VADD.php | 86 ++++++++++++++++++ .../predis/predis/src/Command/Redis/VCARD.php | 26 ++++++ .../predis/predis/src/Command/Redis/VDIM.php | 26 ++++++ .../predis/predis/src/Command/Redis/VEMB.php | 70 +++++++++++++++ .../predis/src/Command/Redis/VGETATTR.php | 70 +++++++++++++++ .../predis/predis/src/Command/Redis/VINFO.php | 40 +++++++++ .../predis/src/Command/Redis/VLINKS.php | 69 ++++++++++++++ .../predis/src/Command/Redis/VRANDMEMBER.php | 41 +++++++++ .../predis/predis/src/Command/Redis/VREM.php | 35 ++++++++ .../predis/src/Command/Redis/VSETATTR.php | 52 +++++++++++ .../predis/predis/src/Command/Redis/VSIM.php | 90 +++++++++++++++++++ .../predis/predis/src/Command/Redis/XACK.php | 34 +++++++ .../predis/src/Command/Redis/XCLAIM.php | 89 ++++++++++++++++++ .../predis/predis/src/Command/Redis/XINFO.php | 49 +++++++++- .../predis/src/Command/Redis/XPENDING.php | 81 +++++++++++++++++ .../predis/predis/src/Command/Redis/XREAD.php | 4 + .../predis/src/Command/Redis/XSETID.php | 49 ++++++++++ .../predis/src/Command/Redis/ZPOPMAX.php | 7 +- .../predis/src/Command/Redis/ZPOPMIN.php | 7 +- .../Replication/SentinelReplication.php | 12 ++- .../predis/src/Connection/Resource/Stream.php | 1 + .../src/Connection/Resource/StreamFactory.php | 6 +- .../src/Connection/StreamConnection.php | 4 +- 143 files changed, 1857 insertions(+), 149 deletions(-) create mode 100644 vendor/predis/predis/src/Command/Redis/Utils/CommandUtility.php create mode 100644 vendor/predis/predis/src/Command/Redis/Utils/VectorUtility.php create mode 100644 vendor/predis/predis/src/Command/Redis/VADD.php create mode 100644 vendor/predis/predis/src/Command/Redis/VCARD.php create mode 100644 vendor/predis/predis/src/Command/Redis/VDIM.php create mode 100644 vendor/predis/predis/src/Command/Redis/VEMB.php create mode 100644 vendor/predis/predis/src/Command/Redis/VGETATTR.php create mode 100644 vendor/predis/predis/src/Command/Redis/VINFO.php create mode 100644 vendor/predis/predis/src/Command/Redis/VLINKS.php create mode 100644 vendor/predis/predis/src/Command/Redis/VRANDMEMBER.php create mode 100644 vendor/predis/predis/src/Command/Redis/VREM.php create mode 100644 vendor/predis/predis/src/Command/Redis/VSETATTR.php create mode 100644 vendor/predis/predis/src/Command/Redis/VSIM.php create mode 100644 vendor/predis/predis/src/Command/Redis/XACK.php create mode 100644 vendor/predis/predis/src/Command/Redis/XCLAIM.php create mode 100644 vendor/predis/predis/src/Command/Redis/XPENDING.php create mode 100644 vendor/predis/predis/src/Command/Redis/XSETID.php diff --git a/VERSION b/VERSION index b561134..04d403d 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -v0.13.1 +v0.14.0-dev diff --git a/vendor/autoload.php b/vendor/autoload.php index d70ed24..c8b8f21 100644 --- a/vendor/autoload.php +++ b/vendor/autoload.php @@ -14,10 +14,7 @@ if (PHP_VERSION_ID < 50600) { echo $err; } } - trigger_error( - $err, - E_USER_ERROR - ); + throw new RuntimeException($err); } require_once __DIR__ . '/composer/autoload_real.php'; diff --git a/vendor/composer/InstalledVersions.php b/vendor/composer/InstalledVersions.php index 51e734a..2052022 100644 --- a/vendor/composer/InstalledVersions.php +++ b/vendor/composer/InstalledVersions.php @@ -26,12 +26,23 @@ use Composer\Semver\VersionParser; */ class InstalledVersions { + /** + * @var string|null if set (by reflection by Composer), this should be set to the path where this class is being copied to + * @internal + */ + private static $selfDir = null; + /** * @var mixed[]|null * @psalm-var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array}|array{}|null */ private static $installed; + /** + * @var bool + */ + private static $installedIsLocalDir; + /** * @var bool|null */ @@ -309,6 +320,24 @@ class InstalledVersions { self::$installed = $data; self::$installedByVendor = array(); + + // when using reload, we disable the duplicate protection to ensure that self::$installed data is + // always returned, but we cannot know whether it comes from the installed.php in __DIR__ or not, + // so we have to assume it does not, and that may result in duplicate data being returned when listing + // all installed packages for example + self::$installedIsLocalDir = false; + } + + /** + * @return string + */ + private static function getSelfDir() + { + if (self::$selfDir === null) { + self::$selfDir = strtr(__DIR__, '\\', '/'); + } + + return self::$selfDir; } /** @@ -322,19 +351,27 @@ class InstalledVersions } $installed = array(); + $copiedLocalDir = false; if (self::$canGetVendors) { + $selfDir = self::getSelfDir(); foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) { + $vendorDir = strtr($vendorDir, '\\', '/'); if (isset(self::$installedByVendor[$vendorDir])) { $installed[] = self::$installedByVendor[$vendorDir]; } elseif (is_file($vendorDir.'/composer/installed.php')) { /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array} $required */ $required = require $vendorDir.'/composer/installed.php'; - $installed[] = self::$installedByVendor[$vendorDir] = $required; - if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) { - self::$installed = $installed[count($installed) - 1]; + self::$installedByVendor[$vendorDir] = $required; + $installed[] = $required; + if (self::$installed === null && $vendorDir.'/composer' === $selfDir) { + self::$installed = $required; + self::$installedIsLocalDir = true; } } + if (self::$installedIsLocalDir && $vendorDir.'/composer' === $selfDir) { + $copiedLocalDir = true; + } } } @@ -350,7 +387,7 @@ class InstalledVersions } } - if (self::$installed !== array()) { + if (self::$installed !== array() && !$copiedLocalDir) { $installed[] = self::$installed; } diff --git a/vendor/composer/autoload_psr4.php b/vendor/composer/autoload_psr4.php index 845579b..f5861b8 100644 --- a/vendor/composer/autoload_psr4.php +++ b/vendor/composer/autoload_psr4.php @@ -32,12 +32,12 @@ return array( 'Ramsey\\Uuid\\' => array($vendorDir . '/ramsey/uuid/src'), 'Ramsey\\Collection\\' => array($vendorDir . '/ramsey/collection/src'), 'Psr\\Log\\' => array($vendorDir . '/psr/log/Psr/Log'), - 'Psr\\Http\\Message\\' => array($vendorDir . '/psr/http-message/src', $vendorDir . '/psr/http-factory/src'), + 'Psr\\Http\\Message\\' => array($vendorDir . '/psr/http-factory/src', $vendorDir . '/psr/http-message/src'), 'Psr\\Http\\Client\\' => array($vendorDir . '/psr/http-client/src'), 'Predis\\' => array($vendorDir . '/predis/predis/src'), 'Masterminds\\' => array($vendorDir . '/masterminds/html5/src'), 'Jfcherng\\Utility\\' => array($vendorDir . '/jfcherng/php-mb-string/src', $vendorDir . '/jfcherng/php-color-output/src'), - 'Jfcherng\\Diff\\' => array($vendorDir . '/jfcherng/php-sequence-matcher/src', $vendorDir . '/jfcherng/php-diff/src'), + 'Jfcherng\\Diff\\' => array($vendorDir . '/jfcherng/php-diff/src', $vendorDir . '/jfcherng/php-sequence-matcher/src'), 'GuzzleHttp\\Psr7\\' => array($vendorDir . '/guzzlehttp/psr7/src'), 'GuzzleHttp\\Promise\\' => array($vendorDir . '/guzzlehttp/promises/src'), 'GuzzleHttp\\' => array($vendorDir . '/guzzlehttp/guzzle/src'), diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php index d74ecc8..5592587 100644 --- a/vendor/composer/autoload_static.php +++ b/vendor/composer/autoload_static.php @@ -226,8 +226,8 @@ class ComposerStaticInit5d5db0943532ec3ad2d064ba31305947 ), 'Psr\\Http\\Message\\' => array ( - 0 => __DIR__ . '/..' . '/psr/http-message/src', - 1 => __DIR__ . '/..' . '/psr/http-factory/src', + 0 => __DIR__ . '/..' . '/psr/http-factory/src', + 1 => __DIR__ . '/..' . '/psr/http-message/src', ), 'Psr\\Http\\Client\\' => array ( @@ -248,8 +248,8 @@ class ComposerStaticInit5d5db0943532ec3ad2d064ba31305947 ), 'Jfcherng\\Diff\\' => array ( - 0 => __DIR__ . '/..' . '/jfcherng/php-sequence-matcher/src', - 1 => __DIR__ . '/..' . '/jfcherng/php-diff/src', + 0 => __DIR__ . '/..' . '/jfcherng/php-diff/src', + 1 => __DIR__ . '/..' . '/jfcherng/php-sequence-matcher/src', ), 'GuzzleHttp\\Psr7\\' => array ( diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index 7fc1212..a539459 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -2271,17 +2271,17 @@ }, { "name": "predis/predis", - "version": "v3.0.1", - "version_normalized": "3.0.1.0", + "version": "v3.1.0", + "version_normalized": "3.1.0.0", "source": { "type": "git", "url": "https://github.com/predis/predis.git", - "reference": "34fb0a7da0330df1bab4280fcac4afdeeccc3edf" + "reference": "202e0c5322b906ec4c761c0cefebad6d0959a699" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/predis/predis/zipball/34fb0a7da0330df1bab4280fcac4afdeeccc3edf", - "reference": "34fb0a7da0330df1bab4280fcac4afdeeccc3edf", + "url": "https://api.github.com/repos/predis/predis/zipball/202e0c5322b906ec4c761c0cefebad6d0959a699", + "reference": "202e0c5322b906ec4c761c0cefebad6d0959a699", "shasum": "" }, "require": { @@ -2297,7 +2297,7 @@ "suggest": { "ext-relay": "Faster connection with in-memory caching (>=0.6.2)" }, - "time": "2025-05-16T18:30:32+00:00", + "time": "2025-07-22T15:37:44+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -2325,7 +2325,7 @@ ], "support": { "issues": "https://github.com/predis/predis/issues", - "source": "https://github.com/predis/predis/tree/v3.0.1" + "source": "https://github.com/predis/predis/tree/v3.1.0" }, "funding": [ { diff --git a/vendor/composer/installed.php b/vendor/composer/installed.php index d94529b..cfb037a 100644 --- a/vendor/composer/installed.php +++ b/vendor/composer/installed.php @@ -3,7 +3,7 @@ 'name' => 'icinga/icinga-php-thirdparty', 'pretty_version' => 'dev-main', 'version' => 'dev-main', - 'reference' => 'a3a9a0f9a8449974ad52dcfbd5b1f1512e6e8bdb', + 'reference' => '3308c53f448a7d71ae640f9464b45b7d286e946b', 'type' => 'project', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), @@ -265,7 +265,7 @@ 'icinga/icinga-php-thirdparty' => array( 'pretty_version' => 'dev-main', 'version' => 'dev-main', - 'reference' => 'a3a9a0f9a8449974ad52dcfbd5b1f1512e6e8bdb', + 'reference' => '3308c53f448a7d71ae640f9464b45b7d286e946b', 'type' => 'project', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), @@ -323,9 +323,9 @@ ), ), 'predis/predis' => array( - 'pretty_version' => 'v3.0.1', - 'version' => '3.0.1.0', - 'reference' => '34fb0a7da0330df1bab4280fcac4afdeeccc3edf', + 'pretty_version' => 'v3.1.0', + 'version' => '3.1.0.0', + 'reference' => '202e0c5322b906ec4c761c0cefebad6d0959a699', 'type' => 'library', 'install_path' => __DIR__ . '/../predis/predis', 'aliases' => array(), diff --git a/vendor/composer/platform_check.php b/vendor/composer/platform_check.php index d32d90c..14bf88d 100644 --- a/vendor/composer/platform_check.php +++ b/vendor/composer/platform_check.php @@ -19,8 +19,7 @@ if ($issues) { echo 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . str_replace('You are running '.PHP_VERSION.'.', '', implode(PHP_EOL, $issues)) . PHP_EOL.PHP_EOL; } } - trigger_error( - 'Composer detected issues in your platform: ' . implode(' ', $issues), - E_USER_ERROR + throw new \RuntimeException( + 'Composer detected issues in your platform: ' . implode(' ', $issues) ); } diff --git a/vendor/predis/predis/README.md b/vendor/predis/predis/README.md index 8196b62..276baa5 100644 --- a/vendor/predis/predis/README.md +++ b/vendor/predis/predis/README.md @@ -138,6 +138,50 @@ it is still desired to have control of when the connection is opened or closed: achieved by invoking `$client->connect()` and `$client->disconnect()`. Please note that the effect of these methods on aggregate connections may differ depending on each specific implementation. +#### Persistent connections #### + +To increase a performance of your application you may set up a client to use persistent TCP connection, this way +client saves a time on socket creation and connection handshake. By default, connection is created on first-command +execution and will be automatically closed by GC before the process is being killed. +However, if your application is backed by PHP-FPM the processes are idle, and you may set up it to be persistent and +reusable across multiple script execution within the same process. + +To enable the persistent connection mode you should provide following configuration: + +```php +// Standalone +$client = new Predis\Client(['persistent' => true]); + +// Cluster +$client = new Predis\Client( + ['tcp://host:port', 'tcp://host:port', 'tcp://host:port'], + ['cluster' => 'redis', 'parameters' => ['persistent' => true]] +); +``` + +**Important** + +If you operate on multiple clients within the same application, and they communicate with the same resource, by default +they will share the same socket (that's the default behaviour of persistent sockets). So in this case you would need +to additionally provide a `conn_uid` identifier for each client, this way each client will create its own socket so +the connection context won't be shared across clients. This socket behaviour explained +[here](https://www.php.net/manual/en/function.stream-socket-client.php#105393) + +```php +// Standalone +$client1 = new Predis\Client(['persistent' => true, 'conn_uid' => 'id_1']); +$client2 = new Predis\Client(['persistent' => true, 'conn_uid' => 'id_2']); + +// Cluster +$client1 = new Predis\Client( + ['tcp://host:port', 'tcp://host:port', 'tcp://host:port'], + ['cluster' => 'redis', 'parameters' => ['persistent' => true, 'conn_uid' => 'id_1']] +); +$client2 = new Predis\Client( + ['tcp://host:port', 'tcp://host:port', 'tcp://host:port'], + ['cluster' => 'redis', 'parameters' => ['persistent' => true, 'conn_uid' => 'id_2']] +); +``` ### Client configuration ### diff --git a/vendor/predis/predis/src/Client.php b/vendor/predis/predis/src/Client.php index 7ccaf6a..54f1513 100644 --- a/vendor/predis/predis/src/Client.php +++ b/vendor/predis/predis/src/Client.php @@ -54,7 +54,7 @@ use Traversable; */ class Client implements ClientInterface, IteratorAggregate { - public const VERSION = '3.0.1'; + public const VERSION = '3.1.0'; /** @var OptionsInterface */ private $options; diff --git a/vendor/predis/predis/src/ClientContextInterface.php b/vendor/predis/predis/src/ClientContextInterface.php index 01681e4..72d43b4 100644 --- a/vendor/predis/predis/src/ClientContextInterface.php +++ b/vendor/predis/predis/src/ClientContextInterface.php @@ -45,6 +45,7 @@ use Predis\Command\Container\Json\JSONDEBUG; use Predis\Command\Container\Search\FTCONFIG; use Predis\Command\Container\Search\FTCURSOR; use Predis\Command\Container\XGROUP; +use Predis\Command\Redis\VADD; /** * Interface defining a client-side context such as a pipeline or transaction. @@ -283,6 +284,19 @@ use Predis\Command\Container\XGROUP; * @method $this tsqueryindex(string ...$filterExpression) * @method $this tsrange(string $key, $fromTimestamp, $toTimestamp, ?RangeArguments $arguments = null) * @method $this tsrevrange(string $key, $fromTimestamp, $toTimestamp, ?RangeArguments $arguments = null) + * @method $this xack(string $key, string $group, string ...$id) + * @method $this xadd(string $key, array $dictionary, string $id = '*', array $options = null) + * @method $this xautoclaim(string $key, string $group, string $consumer, int $minIdleTime, string $start, ?int $count = null, bool $justId = false) + * @method $this xclaim(string $key, string $group, string $consumer, int $minIdleTime, string|array $ids, ?int $idle = null, ?int $time = null, ?int $retryCount = null, bool $force = false, bool $justId = false, ?string $lastId = null) + * @method $this xdel(string $key, string ...$id) + * @method $this xlen(string $key) + * @method $this xpending(string $key, string $group, ?int $minIdleTime = null, ?string $start = null, ?string $end = null, ?int $count = null, ?string $consumer = null) + * @method $this xrevrange(string $key, string $end, string $start, ?int $count = null) + * @method $this xrange(string $key, string $start, string $end, ?int $count = null) + * @method $this xread(int $count = null, int $block = null, array $streams = null, string ...$id) + * @method $this xreadgroup(string $group, string $consumer, ?int $count = null, ?int $blockMs = null, bool $noAck = false, string ...$keyOrId) + * @method $this xsetid(string $key, string $lastId, ?int $entriesAdded = null, ?string $maxDeleteId = null) + * @method $this xtrim(string $key, array|string $strategy, string $threshold, array $options = null) * @method $this zadd($key, array $membersAndScoresDictionary) * @method $this zcard($key) * @method $this zcount($key, $min, $max) @@ -325,6 +339,17 @@ use Predis\Command\Container\XGROUP; * @method $this unwatch() * @method $this waitaof(int $numLocal, int $numReplicas, int $timeout) * @method $this unsubscribe(string ...$channels) + * @method $this vadd(string $key, string|array $vector, string $elem, int $dim = null, bool $cas = false, string $quant = VADD::QUANT_DEFAULT, ?int $BEF = null, string|array $attributes = null, int $numlinks = null) + * @method $this vcard(string $key) + * @method $this vdim(int $key) + * @method $this vemb(string $key, string $elem, bool $raw = false) + * @method $this vgetattr(string $key, string $elem, bool $asJson = false) + * @method $this vinfo(string $key) + * @method $this vlinks(string $key, string $elem, bool $withScores = false) + * @method $this vrandmember(string $key, int $count = null) + * @method $this vrem(string $key, string $elem) + * @method $this vsetattr(string $key, string $elem, string|array $attributes) + * @method $this vsim(string $key, string|array $vectorOrElem, bool $isElem = false, bool $withScores = false, int $count = null, int $ef = null, string $filter = null, int $filterEf = null, bool $truth = false, bool $noThread = false) * @method $this watch($key) * @method $this eval($script, $numkeys, $keyOrArg1 = null, $keyOrArgN = null) * @method $this eval_ro(string $script, array $keys, ...$argument) diff --git a/vendor/predis/predis/src/ClientInterface.php b/vendor/predis/predis/src/ClientInterface.php index 178b3e4..1c52d1d 100644 --- a/vendor/predis/predis/src/ClientInterface.php +++ b/vendor/predis/predis/src/ClientInterface.php @@ -47,6 +47,7 @@ use Predis\Command\Container\Search\FTCURSOR; use Predis\Command\Container\XGROUP; use Predis\Command\Container\XINFO; use Predis\Command\FactoryInterface; +use Predis\Command\Redis\VADD; use Predis\Configuration\OptionsInterface; use Predis\Connection\ConnectionInterface; use Predis\Response\Status; @@ -294,18 +295,22 @@ use Predis\Response\Status; * @method array tsqueryindex(string ...$filterExpression) * @method array tsrange(string $key, $fromTimestamp, $toTimestamp, ?RangeArguments $arguments = null) * @method array tsrevrange(string $key, $fromTimestamp, $toTimestamp, ?RangeArguments $arguments = null) + * @method int xack(string $key, string $group, string ...$id) * @method string xadd(string $key, array $dictionary, string $id = '*', array $options = null) * @method array xautoclaim(string $key, string $group, string $consumer, int $minIdleTime, string $start, ?int $count = null, bool $justId = false) + * @method array xclaim(string $key, string $group, string $consumer, int $minIdleTime, string|array $ids, ?int $idle = null, ?int $time = null, ?int $retryCount = null, bool $force = false, bool $justId = false, ?string $lastId = null) * @method int xdel(string $key, string ...$id) * @method int xlen(string $key) + * @method array xpending(string $key, string $group, ?int $minIdleTime = null, ?string $start = null, ?string $end = null, ?int $count = null, ?string $consumer = null) * @method array xrevrange(string $key, string $end, string $start, ?int $count = null) * @method array xrange(string $key, string $start, string $end, ?int $count = null) * @method array|null xread(int $count = null, int $block = null, array $streams = null, string ...$id) * @method array xreadgroup(string $group, string $consumer, ?int $count = null, ?int $blockMs = null, bool $noAck = false, string ...$keyOrId) + * @method Status xsetid(string $key, string $lastId, ?int $entriesAdded = null, ?string $maxDeleteId = null) * @method string xtrim(string $key, array|string $strategy, string $threshold, array $options = null) * @method int zadd(string $key, array $membersAndScoresDictionary) * @method int zcard(string $key) - * @method string zcount(string $key, int|string $min, int|string $max) + * @method int zcount(string $key, int|string $min, int|string $max) * @method array zdiff(array $keys, bool $withScores = false) * @method int zdiffstore(string $destination, array $keys) * @method string zincrby(string $key, int $increment, string $member) @@ -346,6 +351,17 @@ use Predis\Response\Status; * @method mixed multi() * @method mixed unwatch() * @method array unsubscribe(string ...$channels) + * @method bool vadd(string $key, string|array $vector, string $elem, int $dim = null, bool $cas = false, string $quant = VADD::QUANT_DEFAULT, int $bef = null, string|array $attributes = null, int $numlinks = null) + * @method int vcard(string $key) + * @method int vdim(string $key) + * @method array vemb(string $key, string $elem, bool $raw = false) + * @method string|array|null vgetattr(string $key, string $elem, bool $asJson = false) + * @method array|null vinfo(string $key) + * @method array|null vlinks(string $key, string $elem, bool $withScores = false) + * @method string|array|null vrandmember(string $key, int $count = null) + * @method bool vrem(string $key, string $elem) + * @method array vsim(string $key, string|array $vectorOrElem, bool $isElem = false, bool $withScores = false, int $count = null, int $ef = null, string $filter = null, int $filterEf = null, bool $truth = false, bool $noThread = false) + * @method bool vsetattr(string $key, string $elem, string|array $attributes) * @method array waitaof(int $numLocal, int $numReplicas, int $timeout) * @method mixed watch(string[]|string $keyOrKeys) * @method mixed eval(string $script, int $numkeys, string ...$keyOrArg = null) diff --git a/vendor/predis/predis/src/Command/PrefixableCommand.php b/vendor/predis/predis/src/Command/PrefixableCommand.php index f531f6d..cf74151 100644 --- a/vendor/predis/predis/src/Command/PrefixableCommand.php +++ b/vendor/predis/predis/src/Command/PrefixableCommand.php @@ -32,7 +32,7 @@ abstract class PrefixableCommand extends Command implements PrefixableCommandInt */ public function applyPrefixForAllArguments(string $prefix): void { - $this->setArguments( + $this->setRawArguments( array_map(static function ($key) use ($prefix) { return $prefix . $key; }, $this->getArguments()) @@ -49,7 +49,7 @@ abstract class PrefixableCommand extends Command implements PrefixableCommandInt { $arguments = $this->getArguments(); $arguments[0] = $prefix . $arguments[0]; - $this->setArguments($arguments); + $this->setRawArguments($arguments); } /** diff --git a/vendor/predis/predis/src/Command/Redis/BITOP.php b/vendor/predis/predis/src/Command/Redis/BITOP.php index 8dc6881..b0a1d73 100644 --- a/vendor/predis/predis/src/Command/Redis/BITOP.php +++ b/vendor/predis/predis/src/Command/Redis/BITOP.php @@ -12,6 +12,7 @@ namespace Predis\Command\Redis; +use InvalidArgumentException; use Predis\Command\PrefixableCommand as RedisCommand; /** @@ -19,6 +20,8 @@ use Predis\Command\PrefixableCommand as RedisCommand; */ class BITOP extends RedisCommand { + private const VALID_OPERATIONS = ['AND', 'OR', 'XOR', 'NOT', 'DIFF', 'DIFF1', 'ANDOR', 'ONE']; + /** * {@inheritdoc} */ @@ -38,6 +41,13 @@ class BITOP extends RedisCommand array_unshift($arguments, $operation, $destination); } + if (!empty($arguments)) { + $operation = strtoupper($arguments[0]); + if (!in_array($operation, self::VALID_OPERATIONS, false)) { + throw new InvalidArgumentException('BITOP operation must be one of: AND, OR, XOR, NOT, DIFF, DIFF1, ANDOR, ONE'); + } + } + parent::setArguments($arguments); } diff --git a/vendor/predis/predis/src/Command/Redis/BloomFilter/BFADD.php b/vendor/predis/predis/src/Command/Redis/BloomFilter/BFADD.php index 34e095d..07fe6af 100644 --- a/vendor/predis/predis/src/Command/Redis/BloomFilter/BFADD.php +++ b/vendor/predis/predis/src/Command/Redis/BloomFilter/BFADD.php @@ -12,7 +12,7 @@ namespace Predis\Command\Redis\BloomFilter; -use Predis\Command\Command as RedisCommand; +use Predis\Command\PrefixableCommand as RedisCommand; /** * @see https://redis.io/commands/bf.add/ @@ -26,4 +26,9 @@ class BFADD extends RedisCommand { return 'BF.ADD'; } + + public function prefixKeys($prefix) + { + $this->applyPrefixForFirstArgument($prefix); + } } diff --git a/vendor/predis/predis/src/Command/Redis/BloomFilter/BFEXISTS.php b/vendor/predis/predis/src/Command/Redis/BloomFilter/BFEXISTS.php index 3d2ef6e..de25ab4 100644 --- a/vendor/predis/predis/src/Command/Redis/BloomFilter/BFEXISTS.php +++ b/vendor/predis/predis/src/Command/Redis/BloomFilter/BFEXISTS.php @@ -12,7 +12,7 @@ namespace Predis\Command\Redis\BloomFilter; -use Predis\Command\Command as RedisCommand; +use Predis\Command\PrefixableCommand as RedisCommand; /** * @see https://redis.io/commands/bf.exists/ @@ -25,4 +25,9 @@ class BFEXISTS extends RedisCommand { return 'BF.EXISTS'; } + + public function prefixKeys($prefix) + { + $this->applyPrefixForFirstArgument($prefix); + } } diff --git a/vendor/predis/predis/src/Command/Redis/BloomFilter/BFINFO.php b/vendor/predis/predis/src/Command/Redis/BloomFilter/BFINFO.php index b0d5322..a2832c4 100644 --- a/vendor/predis/predis/src/Command/Redis/BloomFilter/BFINFO.php +++ b/vendor/predis/predis/src/Command/Redis/BloomFilter/BFINFO.php @@ -12,7 +12,7 @@ namespace Predis\Command\Redis\BloomFilter; -use Predis\Command\Command as RedisCommand; +use Predis\Command\PrefixableCommand as RedisCommand; use UnexpectedValueException; /** @@ -76,4 +76,9 @@ class BFINFO extends RedisCommand return $data; } + + public function prefixKeys($prefix) + { + $this->applyPrefixForFirstArgument($prefix); + } } diff --git a/vendor/predis/predis/src/Command/Redis/BloomFilter/BFINSERT.php b/vendor/predis/predis/src/Command/Redis/BloomFilter/BFINSERT.php index 0efcdcc..6825cbf 100644 --- a/vendor/predis/predis/src/Command/Redis/BloomFilter/BFINSERT.php +++ b/vendor/predis/predis/src/Command/Redis/BloomFilter/BFINSERT.php @@ -12,7 +12,7 @@ namespace Predis\Command\Redis\BloomFilter; -use Predis\Command\Command as RedisCommand; +use Predis\Command\PrefixableCommand as RedisCommand; use Predis\Command\Traits\BloomFilters\Capacity; use Predis\Command\Traits\BloomFilters\Error; use Predis\Command\Traits\BloomFilters\Expansion; @@ -48,6 +48,11 @@ class BFINSERT extends RedisCommand return 'BF.INSERT'; } + public function prefixKeys($prefix) + { + $this->applyPrefixForFirstArgument($prefix); + } + public function setArguments(array $arguments) { $this->setNoCreate($arguments); diff --git a/vendor/predis/predis/src/Command/Redis/BloomFilter/BFLOADCHUNK.php b/vendor/predis/predis/src/Command/Redis/BloomFilter/BFLOADCHUNK.php index 6c6b88a..747fef3 100644 --- a/vendor/predis/predis/src/Command/Redis/BloomFilter/BFLOADCHUNK.php +++ b/vendor/predis/predis/src/Command/Redis/BloomFilter/BFLOADCHUNK.php @@ -12,7 +12,7 @@ namespace Predis\Command\Redis\BloomFilter; -use Predis\Command\Command as RedisCommand; +use Predis\Command\PrefixableCommand as RedisCommand; /** * @see https://redis.io/commands/bf.loadchunk/ @@ -25,4 +25,9 @@ class BFLOADCHUNK extends RedisCommand { return 'BF.LOADCHUNK'; } + + public function prefixKeys($prefix) + { + $this->applyPrefixForFirstArgument($prefix); + } } diff --git a/vendor/predis/predis/src/Command/Redis/BloomFilter/BFMADD.php b/vendor/predis/predis/src/Command/Redis/BloomFilter/BFMADD.php index a77c9f5..c672e0d 100644 --- a/vendor/predis/predis/src/Command/Redis/BloomFilter/BFMADD.php +++ b/vendor/predis/predis/src/Command/Redis/BloomFilter/BFMADD.php @@ -12,7 +12,7 @@ namespace Predis\Command\Redis\BloomFilter; -use Predis\Command\Command as RedisCommand; +use Predis\Command\PrefixableCommand as RedisCommand; /** * @see https://redis.io/commands/bf.madd/ @@ -26,4 +26,9 @@ class BFMADD extends RedisCommand { return 'BF.MADD'; } + + public function prefixKeys($prefix) + { + $this->applyPrefixForFirstArgument($prefix); + } } diff --git a/vendor/predis/predis/src/Command/Redis/BloomFilter/BFMEXISTS.php b/vendor/predis/predis/src/Command/Redis/BloomFilter/BFMEXISTS.php index 53e000f..80d88b5 100644 --- a/vendor/predis/predis/src/Command/Redis/BloomFilter/BFMEXISTS.php +++ b/vendor/predis/predis/src/Command/Redis/BloomFilter/BFMEXISTS.php @@ -12,7 +12,7 @@ namespace Predis\Command\Redis\BloomFilter; -use Predis\Command\Command as RedisCommand; +use Predis\Command\PrefixableCommand as RedisCommand; /** * @see https://redis.io/commands/bf.mexists/ @@ -25,4 +25,9 @@ class BFMEXISTS extends RedisCommand { return 'BF.MEXISTS'; } + + public function prefixKeys($prefix) + { + $this->applyPrefixForFirstArgument($prefix); + } } diff --git a/vendor/predis/predis/src/Command/Redis/BloomFilter/BFRESERVE.php b/vendor/predis/predis/src/Command/Redis/BloomFilter/BFRESERVE.php index d2098c0..7340021 100644 --- a/vendor/predis/predis/src/Command/Redis/BloomFilter/BFRESERVE.php +++ b/vendor/predis/predis/src/Command/Redis/BloomFilter/BFRESERVE.php @@ -12,7 +12,7 @@ namespace Predis\Command\Redis\BloomFilter; -use Predis\Command\Command as RedisCommand; +use Predis\Command\PrefixableCommand as RedisCommand; use Predis\Command\Traits\BloomFilters\Expansion; /** @@ -46,4 +46,9 @@ class BFRESERVE extends RedisCommand $this->setExpansion($arguments); $this->filterArguments(); } + + public function prefixKeys($prefix) + { + $this->applyPrefixForFirstArgument($prefix); + } } diff --git a/vendor/predis/predis/src/Command/Redis/BloomFilter/BFSCANDUMP.php b/vendor/predis/predis/src/Command/Redis/BloomFilter/BFSCANDUMP.php index 10206e8..f66898c 100644 --- a/vendor/predis/predis/src/Command/Redis/BloomFilter/BFSCANDUMP.php +++ b/vendor/predis/predis/src/Command/Redis/BloomFilter/BFSCANDUMP.php @@ -12,7 +12,7 @@ namespace Predis\Command\Redis\BloomFilter; -use Predis\Command\Command as RedisCommand; +use Predis\Command\PrefixableCommand as RedisCommand; /** * @see https://redis.io/commands/bf.scandump/ @@ -26,4 +26,9 @@ class BFSCANDUMP extends RedisCommand { return 'BF.SCANDUMP'; } + + public function prefixKeys($prefix) + { + $this->applyPrefixForFirstArgument($prefix); + } } diff --git a/vendor/predis/predis/src/Command/Redis/CountMinSketch/CMSINCRBY.php b/vendor/predis/predis/src/Command/Redis/CountMinSketch/CMSINCRBY.php index b7513f7..5e0e473 100644 --- a/vendor/predis/predis/src/Command/Redis/CountMinSketch/CMSINCRBY.php +++ b/vendor/predis/predis/src/Command/Redis/CountMinSketch/CMSINCRBY.php @@ -12,7 +12,7 @@ namespace Predis\Command\Redis\CountMinSketch; -use Predis\Command\Command as RedisCommand; +use Predis\Command\PrefixableCommand as RedisCommand; /** * @see https://redis.io/commands/cms.incrby/ @@ -26,4 +26,9 @@ class CMSINCRBY extends RedisCommand { return 'CMS.INCRBY'; } + + public function prefixKeys($prefix) + { + $this->applyPrefixForFirstArgument($prefix); + } } diff --git a/vendor/predis/predis/src/Command/Redis/CountMinSketch/CMSINFO.php b/vendor/predis/predis/src/Command/Redis/CountMinSketch/CMSINFO.php index 3dcad4b..25da51c 100644 --- a/vendor/predis/predis/src/Command/Redis/CountMinSketch/CMSINFO.php +++ b/vendor/predis/predis/src/Command/Redis/CountMinSketch/CMSINFO.php @@ -12,7 +12,7 @@ namespace Predis\Command\Redis\CountMinSketch; -use Predis\Command\Command as RedisCommand; +use Predis\Command\PrefixableCommand as RedisCommand; /** * @see https://redis.io/commands/cms.info/ @@ -42,4 +42,9 @@ class CMSINFO extends RedisCommand return $data; } + + public function prefixKeys($prefix) + { + $this->applyPrefixForFirstArgument($prefix); + } } diff --git a/vendor/predis/predis/src/Command/Redis/CountMinSketch/CMSINITBYDIM.php b/vendor/predis/predis/src/Command/Redis/CountMinSketch/CMSINITBYDIM.php index f136e9f..90bcbdc 100644 --- a/vendor/predis/predis/src/Command/Redis/CountMinSketch/CMSINITBYDIM.php +++ b/vendor/predis/predis/src/Command/Redis/CountMinSketch/CMSINITBYDIM.php @@ -12,7 +12,7 @@ namespace Predis\Command\Redis\CountMinSketch; -use Predis\Command\Command as RedisCommand; +use Predis\Command\PrefixableCommand as RedisCommand; /** * @see https://redis.io/commands/cms.initbydim/ @@ -25,4 +25,9 @@ class CMSINITBYDIM extends RedisCommand { return 'CMS.INITBYDIM'; } + + public function prefixKeys($prefix) + { + $this->applyPrefixForFirstArgument($prefix); + } } diff --git a/vendor/predis/predis/src/Command/Redis/CountMinSketch/CMSINITBYPROB.php b/vendor/predis/predis/src/Command/Redis/CountMinSketch/CMSINITBYPROB.php index 0a6ec3a..597f5ed 100644 --- a/vendor/predis/predis/src/Command/Redis/CountMinSketch/CMSINITBYPROB.php +++ b/vendor/predis/predis/src/Command/Redis/CountMinSketch/CMSINITBYPROB.php @@ -12,7 +12,7 @@ namespace Predis\Command\Redis\CountMinSketch; -use Predis\Command\Command as RedisCommand; +use Predis\Command\PrefixableCommand as RedisCommand; /** * @see https://redis.io/commands/cms.initbyprob/ @@ -25,4 +25,9 @@ class CMSINITBYPROB extends RedisCommand { return 'CMS.INITBYPROB'; } + + public function prefixKeys($prefix) + { + $this->applyPrefixForFirstArgument($prefix); + } } diff --git a/vendor/predis/predis/src/Command/Redis/CountMinSketch/CMSMERGE.php b/vendor/predis/predis/src/Command/Redis/CountMinSketch/CMSMERGE.php index b2942a6..51f619c 100644 --- a/vendor/predis/predis/src/Command/Redis/CountMinSketch/CMSMERGE.php +++ b/vendor/predis/predis/src/Command/Redis/CountMinSketch/CMSMERGE.php @@ -12,7 +12,7 @@ namespace Predis\Command\Redis\CountMinSketch; -use Predis\Command\Command as RedisCommand; +use Predis\Command\PrefixableCommand as RedisCommand; /** * @see https://redis.io/commands/cms.merge/ @@ -39,4 +39,17 @@ class CMSMERGE extends RedisCommand parent::setArguments($processedArguments); } + + public function prefixKeys($prefix) + { + if ($arguments = $this->getArguments()) { + $arguments[0] = $prefix . $arguments[0]; + + for ($i = 2, $iMax = (int) $arguments[1] + 2; $i < $iMax; $i++) { + $arguments[$i] = $prefix . $arguments[$i]; + } + + $this->setRawArguments($arguments); + } + } } diff --git a/vendor/predis/predis/src/Command/Redis/CountMinSketch/CMSQUERY.php b/vendor/predis/predis/src/Command/Redis/CountMinSketch/CMSQUERY.php index f4bdcbe..0c97c8c 100644 --- a/vendor/predis/predis/src/Command/Redis/CountMinSketch/CMSQUERY.php +++ b/vendor/predis/predis/src/Command/Redis/CountMinSketch/CMSQUERY.php @@ -12,7 +12,7 @@ namespace Predis\Command\Redis\CountMinSketch; -use Predis\Command\Command as RedisCommand; +use Predis\Command\PrefixableCommand as RedisCommand; /** * @see https://redis.io/commands/cms.query/ @@ -25,4 +25,9 @@ class CMSQUERY extends RedisCommand { return 'CMS.QUERY'; } + + public function prefixKeys($prefix) + { + $this->applyPrefixForFirstArgument($prefix); + } } diff --git a/vendor/predis/predis/src/Command/Redis/CuckooFilter/CFADD.php b/vendor/predis/predis/src/Command/Redis/CuckooFilter/CFADD.php index deba1c2..9c638e4 100644 --- a/vendor/predis/predis/src/Command/Redis/CuckooFilter/CFADD.php +++ b/vendor/predis/predis/src/Command/Redis/CuckooFilter/CFADD.php @@ -12,7 +12,7 @@ namespace Predis\Command\Redis\CuckooFilter; -use Predis\Command\Command as RedisCommand; +use Predis\Command\PrefixableCommand as RedisCommand; /** * @see https://redis.io/commands/cf.add/ @@ -25,4 +25,9 @@ class CFADD extends RedisCommand { return 'CF.ADD'; } + + public function prefixKeys($prefix) + { + $this->applyPrefixForFirstArgument($prefix); + } } diff --git a/vendor/predis/predis/src/Command/Redis/CuckooFilter/CFADDNX.php b/vendor/predis/predis/src/Command/Redis/CuckooFilter/CFADDNX.php index f395de6..4ef2bfe 100644 --- a/vendor/predis/predis/src/Command/Redis/CuckooFilter/CFADDNX.php +++ b/vendor/predis/predis/src/Command/Redis/CuckooFilter/CFADDNX.php @@ -12,7 +12,7 @@ namespace Predis\Command\Redis\CuckooFilter; -use Predis\Command\Command as RedisCommand; +use Predis\Command\PrefixableCommand as RedisCommand; /** * @see https://redis.io/commands/cf.addnx/ @@ -25,4 +25,9 @@ class CFADDNX extends RedisCommand { return 'CF.ADDNX'; } + + public function prefixKeys($prefix) + { + $this->applyPrefixForFirstArgument($prefix); + } } diff --git a/vendor/predis/predis/src/Command/Redis/CuckooFilter/CFCOUNT.php b/vendor/predis/predis/src/Command/Redis/CuckooFilter/CFCOUNT.php index 0ff664b..b4dd0b2 100644 --- a/vendor/predis/predis/src/Command/Redis/CuckooFilter/CFCOUNT.php +++ b/vendor/predis/predis/src/Command/Redis/CuckooFilter/CFCOUNT.php @@ -12,7 +12,7 @@ namespace Predis\Command\Redis\CuckooFilter; -use Predis\Command\Command as RedisCommand; +use Predis\Command\PrefixableCommand as RedisCommand; /** * @see https://redis.io/commands/cf.count/ @@ -26,4 +26,9 @@ class CFCOUNT extends RedisCommand { return 'CF.COUNT'; } + + public function prefixKeys($prefix) + { + $this->applyPrefixForFirstArgument($prefix); + } } diff --git a/vendor/predis/predis/src/Command/Redis/CuckooFilter/CFDEL.php b/vendor/predis/predis/src/Command/Redis/CuckooFilter/CFDEL.php index 39db921..6e60b18 100644 --- a/vendor/predis/predis/src/Command/Redis/CuckooFilter/CFDEL.php +++ b/vendor/predis/predis/src/Command/Redis/CuckooFilter/CFDEL.php @@ -12,7 +12,7 @@ namespace Predis\Command\Redis\CuckooFilter; -use Predis\Command\Command as RedisCommand; +use Predis\Command\PrefixableCommand as RedisCommand; /** * @see https://redis.io/commands/cf.del/ @@ -27,4 +27,9 @@ class CFDEL extends RedisCommand { return 'CF.DEL'; } + + public function prefixKeys($prefix) + { + $this->applyPrefixForFirstArgument($prefix); + } } diff --git a/vendor/predis/predis/src/Command/Redis/CuckooFilter/CFEXISTS.php b/vendor/predis/predis/src/Command/Redis/CuckooFilter/CFEXISTS.php index 9ea7f42..8c5cfce 100644 --- a/vendor/predis/predis/src/Command/Redis/CuckooFilter/CFEXISTS.php +++ b/vendor/predis/predis/src/Command/Redis/CuckooFilter/CFEXISTS.php @@ -12,7 +12,7 @@ namespace Predis\Command\Redis\CuckooFilter; -use Predis\Command\Command as RedisCommand; +use Predis\Command\PrefixableCommand as RedisCommand; /** * @see https://redis.io/commands/cf.exists/ @@ -25,4 +25,9 @@ class CFEXISTS extends RedisCommand { return 'CF.EXISTS'; } + + public function prefixKeys($prefix) + { + $this->applyPrefixForFirstArgument($prefix); + } } diff --git a/vendor/predis/predis/src/Command/Redis/CuckooFilter/CFINFO.php b/vendor/predis/predis/src/Command/Redis/CuckooFilter/CFINFO.php index 7a2bcd9..55d49d0 100644 --- a/vendor/predis/predis/src/Command/Redis/CuckooFilter/CFINFO.php +++ b/vendor/predis/predis/src/Command/Redis/CuckooFilter/CFINFO.php @@ -12,7 +12,7 @@ namespace Predis\Command\Redis\CuckooFilter; -use Predis\Command\Command as RedisCommand; +use Predis\Command\PrefixableCommand as RedisCommand; /** * @see https://redis.io/commands/cf.info/ @@ -42,4 +42,9 @@ class CFINFO extends RedisCommand return $data; } + + public function prefixKeys($prefix) + { + $this->applyPrefixForFirstArgument($prefix); + } } diff --git a/vendor/predis/predis/src/Command/Redis/CuckooFilter/CFINSERT.php b/vendor/predis/predis/src/Command/Redis/CuckooFilter/CFINSERT.php index 009dfc4..4c32aad 100644 --- a/vendor/predis/predis/src/Command/Redis/CuckooFilter/CFINSERT.php +++ b/vendor/predis/predis/src/Command/Redis/CuckooFilter/CFINSERT.php @@ -12,7 +12,7 @@ namespace Predis\Command\Redis\CuckooFilter; -use Predis\Command\Command as RedisCommand; +use Predis\Command\PrefixableCommand as RedisCommand; use Predis\Command\Traits\BloomFilters\Capacity; use Predis\Command\Traits\BloomFilters\Items; use Predis\Command\Traits\BloomFilters\NoCreate; @@ -49,4 +49,9 @@ class CFINSERT extends RedisCommand $this->setCapacity($arguments); $this->filterArguments(); } + + public function prefixKeys($prefix) + { + $this->applyPrefixForFirstArgument($prefix); + } } diff --git a/vendor/predis/predis/src/Command/Redis/CuckooFilter/CFLOADCHUNK.php b/vendor/predis/predis/src/Command/Redis/CuckooFilter/CFLOADCHUNK.php index b702781..737c4c2 100644 --- a/vendor/predis/predis/src/Command/Redis/CuckooFilter/CFLOADCHUNK.php +++ b/vendor/predis/predis/src/Command/Redis/CuckooFilter/CFLOADCHUNK.php @@ -12,7 +12,7 @@ namespace Predis\Command\Redis\CuckooFilter; -use Predis\Command\Command as RedisCommand; +use Predis\Command\PrefixableCommand as RedisCommand; /** * @see https://redis.io/commands/cf.loadchunk/ @@ -26,4 +26,9 @@ class CFLOADCHUNK extends RedisCommand { return 'CF.LOADCHUNK'; } + + public function prefixKeys($prefix) + { + $this->applyPrefixForFirstArgument($prefix); + } } diff --git a/vendor/predis/predis/src/Command/Redis/CuckooFilter/CFMEXISTS.php b/vendor/predis/predis/src/Command/Redis/CuckooFilter/CFMEXISTS.php index cd60129..f8ae03a 100644 --- a/vendor/predis/predis/src/Command/Redis/CuckooFilter/CFMEXISTS.php +++ b/vendor/predis/predis/src/Command/Redis/CuckooFilter/CFMEXISTS.php @@ -12,7 +12,7 @@ namespace Predis\Command\Redis\CuckooFilter; -use Predis\Command\Command as RedisCommand; +use Predis\Command\PrefixableCommand as RedisCommand; /** * @see https://redis.io/commands/cf.mexists/ @@ -25,4 +25,9 @@ class CFMEXISTS extends RedisCommand { return 'CF.MEXISTS'; } + + public function prefixKeys($prefix) + { + $this->applyPrefixForFirstArgument($prefix); + } } diff --git a/vendor/predis/predis/src/Command/Redis/CuckooFilter/CFRESERVE.php b/vendor/predis/predis/src/Command/Redis/CuckooFilter/CFRESERVE.php index 9b606eb..0b6afce 100644 --- a/vendor/predis/predis/src/Command/Redis/CuckooFilter/CFRESERVE.php +++ b/vendor/predis/predis/src/Command/Redis/CuckooFilter/CFRESERVE.php @@ -12,7 +12,7 @@ namespace Predis\Command\Redis\CuckooFilter; -use Predis\Command\Command as RedisCommand; +use Predis\Command\PrefixableCommand as RedisCommand; use Predis\Command\Traits\BloomFilters\BucketSize; use Predis\Command\Traits\BloomFilters\Expansion; use Predis\Command\Traits\BloomFilters\MaxIterations; @@ -49,4 +49,9 @@ class CFRESERVE extends RedisCommand $this->setBucketSize($arguments); $this->filterArguments(); } + + public function prefixKeys($prefix) + { + $this->applyPrefixForFirstArgument($prefix); + } } diff --git a/vendor/predis/predis/src/Command/Redis/CuckooFilter/CFSCANDUMP.php b/vendor/predis/predis/src/Command/Redis/CuckooFilter/CFSCANDUMP.php index cb98deb..d37c19f 100644 --- a/vendor/predis/predis/src/Command/Redis/CuckooFilter/CFSCANDUMP.php +++ b/vendor/predis/predis/src/Command/Redis/CuckooFilter/CFSCANDUMP.php @@ -12,7 +12,7 @@ namespace Predis\Command\Redis\CuckooFilter; -use Predis\Command\Command as RedisCommand; +use Predis\Command\PrefixableCommand as RedisCommand; /** * @see https://redis.io/commands/cf.scandump/ @@ -26,4 +26,9 @@ class CFSCANDUMP extends RedisCommand { return 'CF.SCANDUMP'; } + + public function prefixKeys($prefix) + { + $this->applyPrefixForFirstArgument($prefix); + } } diff --git a/vendor/predis/predis/src/Command/Redis/EXPIRETIME.php b/vendor/predis/predis/src/Command/Redis/EXPIRETIME.php index 6e3cb12..ec5c722 100644 --- a/vendor/predis/predis/src/Command/Redis/EXPIRETIME.php +++ b/vendor/predis/predis/src/Command/Redis/EXPIRETIME.php @@ -12,7 +12,7 @@ namespace Predis\Command\Redis; -use Predis\Command\Command as RedisCommand; +use Predis\Command\PrefixableCommand as RedisCommand; /** * @see https://redis.io/commands/expiretime/ @@ -26,4 +26,9 @@ class EXPIRETIME extends RedisCommand { return 'EXPIRETIME'; } + + public function prefixKeys($prefix) + { + $this->applyPrefixForFirstArgument($prefix); + } } diff --git a/vendor/predis/predis/src/Command/Redis/GEOSEARCH.php b/vendor/predis/predis/src/Command/Redis/GEOSEARCH.php index 89529f6..d4fe046 100644 --- a/vendor/predis/predis/src/Command/Redis/GEOSEARCH.php +++ b/vendor/predis/predis/src/Command/Redis/GEOSEARCH.php @@ -12,7 +12,7 @@ namespace Predis\Command\Redis; -use Predis\Command\Command as RedisCommand; +use Predis\Command\PrefixableCommand as RedisCommand; use Predis\Command\Traits\By\GeoBy; use Predis\Command\Traits\Count; use Predis\Command\Traits\From\GeoFrom; @@ -119,4 +119,9 @@ class GEOSEARCH extends RedisCommand return $parsedData; } + + public function prefixKeys($prefix) + { + $this->applyPrefixForFirstArgument($prefix); + } } diff --git a/vendor/predis/predis/src/Command/Redis/GETDEL.php b/vendor/predis/predis/src/Command/Redis/GETDEL.php index 283ba1b..8220a70 100644 --- a/vendor/predis/predis/src/Command/Redis/GETDEL.php +++ b/vendor/predis/predis/src/Command/Redis/GETDEL.php @@ -12,7 +12,7 @@ namespace Predis\Command\Redis; -use Predis\Command\Command as RedisCommand; +use Predis\Command\PrefixableCommand as RedisCommand; class GETDEL extends RedisCommand { @@ -20,4 +20,9 @@ class GETDEL extends RedisCommand { return 'GETDEL'; } + + public function prefixKeys($prefix) + { + $this->applyPrefixForFirstArgument($prefix); + } } diff --git a/vendor/predis/predis/src/Command/Redis/Json/JSONARRAPPEND.php b/vendor/predis/predis/src/Command/Redis/Json/JSONARRAPPEND.php index 12ca3f8..5f8bdba 100644 --- a/vendor/predis/predis/src/Command/Redis/Json/JSONARRAPPEND.php +++ b/vendor/predis/predis/src/Command/Redis/Json/JSONARRAPPEND.php @@ -12,7 +12,7 @@ namespace Predis\Command\Redis\Json; -use Predis\Command\Command as RedisCommand; +use Predis\Command\PrefixableCommand as RedisCommand; /** * @see https://redis.io/commands/json.arrappend/ @@ -25,4 +25,9 @@ class JSONARRAPPEND extends RedisCommand { return 'JSON.ARRAPPEND'; } + + public function prefixKeys($prefix) + { + $this->applyPrefixForFirstArgument($prefix); + } } diff --git a/vendor/predis/predis/src/Command/Redis/Json/JSONARRINDEX.php b/vendor/predis/predis/src/Command/Redis/Json/JSONARRINDEX.php index 9710df2..ea157ec 100644 --- a/vendor/predis/predis/src/Command/Redis/Json/JSONARRINDEX.php +++ b/vendor/predis/predis/src/Command/Redis/Json/JSONARRINDEX.php @@ -12,7 +12,7 @@ namespace Predis\Command\Redis\Json; -use Predis\Command\Command as RedisCommand; +use Predis\Command\PrefixableCommand as RedisCommand; /** * @see https://redis.io/commands/json.arrindex/ @@ -25,4 +25,9 @@ class JSONARRINDEX extends RedisCommand { return 'JSON.ARRINDEX'; } + + public function prefixKeys($prefix) + { + $this->applyPrefixForFirstArgument($prefix); + } } diff --git a/vendor/predis/predis/src/Command/Redis/Json/JSONARRINSERT.php b/vendor/predis/predis/src/Command/Redis/Json/JSONARRINSERT.php index 719aad7..c2029c3 100644 --- a/vendor/predis/predis/src/Command/Redis/Json/JSONARRINSERT.php +++ b/vendor/predis/predis/src/Command/Redis/Json/JSONARRINSERT.php @@ -12,7 +12,7 @@ namespace Predis\Command\Redis\Json; -use Predis\Command\Command as RedisCommand; +use Predis\Command\PrefixableCommand as RedisCommand; /** * @see https://redis.io/commands/json.arrinsert/ @@ -25,4 +25,9 @@ class JSONARRINSERT extends RedisCommand { return 'JSON.ARRINSERT'; } + + public function prefixKeys($prefix) + { + $this->applyPrefixForFirstArgument($prefix); + } } diff --git a/vendor/predis/predis/src/Command/Redis/Json/JSONARRLEN.php b/vendor/predis/predis/src/Command/Redis/Json/JSONARRLEN.php index 8fb13dd..e945097 100644 --- a/vendor/predis/predis/src/Command/Redis/Json/JSONARRLEN.php +++ b/vendor/predis/predis/src/Command/Redis/Json/JSONARRLEN.php @@ -12,7 +12,7 @@ namespace Predis\Command\Redis\Json; -use Predis\Command\Command as RedisCommand; +use Predis\Command\PrefixableCommand as RedisCommand; /** * @see https://redis.io/commands/json.arrlen/ @@ -25,4 +25,9 @@ class JSONARRLEN extends RedisCommand { return 'JSON.ARRLEN'; } + + public function prefixKeys($prefix) + { + $this->applyPrefixForFirstArgument($prefix); + } } diff --git a/vendor/predis/predis/src/Command/Redis/Json/JSONARRPOP.php b/vendor/predis/predis/src/Command/Redis/Json/JSONARRPOP.php index 080fa3b..6de9af2 100644 --- a/vendor/predis/predis/src/Command/Redis/Json/JSONARRPOP.php +++ b/vendor/predis/predis/src/Command/Redis/Json/JSONARRPOP.php @@ -12,7 +12,7 @@ namespace Predis\Command\Redis\Json; -use Predis\Command\Command as RedisCommand; +use Predis\Command\PrefixableCommand as RedisCommand; /** * @see https://redis.io/commands/json.arrpop/ @@ -25,4 +25,9 @@ class JSONARRPOP extends RedisCommand { return 'JSON.ARRPOP'; } + + public function prefixKeys($prefix) + { + $this->applyPrefixForFirstArgument($prefix); + } } diff --git a/vendor/predis/predis/src/Command/Redis/Json/JSONARRTRIM.php b/vendor/predis/predis/src/Command/Redis/Json/JSONARRTRIM.php index 70af333..6aaa238 100644 --- a/vendor/predis/predis/src/Command/Redis/Json/JSONARRTRIM.php +++ b/vendor/predis/predis/src/Command/Redis/Json/JSONARRTRIM.php @@ -12,7 +12,7 @@ namespace Predis\Command\Redis\Json; -use Predis\Command\Command as RedisCommand; +use Predis\Command\PrefixableCommand as RedisCommand; /** * @see https://redis.io/commands/json.arrtrim/ @@ -25,4 +25,9 @@ class JSONARRTRIM extends RedisCommand { return 'JSON.ARRTRIM'; } + + public function prefixKeys($prefix) + { + $this->applyPrefixForFirstArgument($prefix); + } } diff --git a/vendor/predis/predis/src/Command/Redis/Json/JSONCLEAR.php b/vendor/predis/predis/src/Command/Redis/Json/JSONCLEAR.php index af7b690..4842b16 100644 --- a/vendor/predis/predis/src/Command/Redis/Json/JSONCLEAR.php +++ b/vendor/predis/predis/src/Command/Redis/Json/JSONCLEAR.php @@ -12,7 +12,7 @@ namespace Predis\Command\Redis\Json; -use Predis\Command\Command as RedisCommand; +use Predis\Command\PrefixableCommand as RedisCommand; /** * @see https://redis.io/commands/json.clear/ @@ -25,4 +25,9 @@ class JSONCLEAR extends RedisCommand { return 'JSON.CLEAR'; } + + public function prefixKeys($prefix) + { + $this->applyPrefixForFirstArgument($prefix); + } } diff --git a/vendor/predis/predis/src/Command/Redis/Json/JSONDEL.php b/vendor/predis/predis/src/Command/Redis/Json/JSONDEL.php index 8ee739c..b6bdb7d 100644 --- a/vendor/predis/predis/src/Command/Redis/Json/JSONDEL.php +++ b/vendor/predis/predis/src/Command/Redis/Json/JSONDEL.php @@ -12,7 +12,7 @@ namespace Predis\Command\Redis\Json; -use Predis\Command\Command as RedisCommand; +use Predis\Command\PrefixableCommand as RedisCommand; /** * @see https://redis.io/commands/json.del/ @@ -25,4 +25,9 @@ class JSONDEL extends RedisCommand { return 'JSON.DEL'; } + + public function prefixKeys($prefix) + { + $this->applyPrefixForFirstArgument($prefix); + } } diff --git a/vendor/predis/predis/src/Command/Redis/Json/JSONFORGET.php b/vendor/predis/predis/src/Command/Redis/Json/JSONFORGET.php index 4abe251..01b7625 100644 --- a/vendor/predis/predis/src/Command/Redis/Json/JSONFORGET.php +++ b/vendor/predis/predis/src/Command/Redis/Json/JSONFORGET.php @@ -12,7 +12,7 @@ namespace Predis\Command\Redis\Json; -use Predis\Command\Command as RedisCommand; +use Predis\Command\PrefixableCommand as RedisCommand; /** * @see https://redis.io/commands/json.forget/ @@ -25,4 +25,9 @@ class JSONFORGET extends RedisCommand { return 'JSON.FORGET'; } + + public function prefixKeys($prefix) + { + $this->applyPrefixForFirstArgument($prefix); + } } diff --git a/vendor/predis/predis/src/Command/Redis/Json/JSONGET.php b/vendor/predis/predis/src/Command/Redis/Json/JSONGET.php index 64aceba..3ccefa6 100644 --- a/vendor/predis/predis/src/Command/Redis/Json/JSONGET.php +++ b/vendor/predis/predis/src/Command/Redis/Json/JSONGET.php @@ -12,7 +12,7 @@ namespace Predis\Command\Redis\Json; -use Predis\Command\Command as RedisCommand; +use Predis\Command\PrefixableCommand as RedisCommand; use Predis\Command\Traits\Json\Indent; use Predis\Command\Traits\Json\Newline; use Predis\Command\Traits\Json\Space; @@ -54,4 +54,9 @@ class JSONGET extends RedisCommand $this->setIndent($arguments); $this->filterArguments(); } + + public function prefixKeys($prefix) + { + $this->applyPrefixForFirstArgument($prefix); + } } diff --git a/vendor/predis/predis/src/Command/Redis/Json/JSONMERGE.php b/vendor/predis/predis/src/Command/Redis/Json/JSONMERGE.php index f272c4b..b72fd59 100644 --- a/vendor/predis/predis/src/Command/Redis/Json/JSONMERGE.php +++ b/vendor/predis/predis/src/Command/Redis/Json/JSONMERGE.php @@ -12,7 +12,7 @@ namespace Predis\Command\Redis\Json; -use Predis\Command\Command as RedisCommand; +use Predis\Command\PrefixableCommand as RedisCommand; /** * @see https://redis.io/commands/json.merge/ @@ -26,4 +26,9 @@ class JSONMERGE extends RedisCommand { return 'JSON.MERGE'; } + + public function prefixKeys($prefix) + { + $this->applyPrefixForFirstArgument($prefix); + } } diff --git a/vendor/predis/predis/src/Command/Redis/Json/JSONMGET.php b/vendor/predis/predis/src/Command/Redis/Json/JSONMGET.php index fa1f19a..aefa23a 100644 --- a/vendor/predis/predis/src/Command/Redis/Json/JSONMGET.php +++ b/vendor/predis/predis/src/Command/Redis/Json/JSONMGET.php @@ -12,7 +12,7 @@ namespace Predis\Command\Redis\Json; -use Predis\Command\Command as RedisCommand; +use Predis\Command\PrefixableCommand as RedisCommand; class JSONMGET extends RedisCommand { @@ -33,4 +33,9 @@ class JSONMGET extends RedisCommand parent::setArguments($unpackedArguments); } + + public function prefixKeys($prefix) + { + $this->applyPrefixSkippingLastArgument($prefix); + } } diff --git a/vendor/predis/predis/src/Command/Redis/Json/JSONMSET.php b/vendor/predis/predis/src/Command/Redis/Json/JSONMSET.php index 5b72c03..45c089d 100644 --- a/vendor/predis/predis/src/Command/Redis/Json/JSONMSET.php +++ b/vendor/predis/predis/src/Command/Redis/Json/JSONMSET.php @@ -12,7 +12,7 @@ namespace Predis\Command\Redis\Json; -use Predis\Command\Command as RedisCommand; +use Predis\Command\PrefixableCommand as RedisCommand; /** * @see https://redis.io/commands/json.mset/ @@ -25,4 +25,15 @@ class JSONMSET extends RedisCommand { return 'JSON.MSET'; } + + public function prefixKeys($prefix) + { + if ($arguments = $this->getArguments()) { + for ($i = 0, $l = count($arguments); $i < $l; $i += 3) { + $arguments[$i] = $prefix . $arguments[$i]; + } + + $this->setArguments($arguments); + } + } } diff --git a/vendor/predis/predis/src/Command/Redis/Json/JSONNUMINCRBY.php b/vendor/predis/predis/src/Command/Redis/Json/JSONNUMINCRBY.php index 6902500..9ca4610 100644 --- a/vendor/predis/predis/src/Command/Redis/Json/JSONNUMINCRBY.php +++ b/vendor/predis/predis/src/Command/Redis/Json/JSONNUMINCRBY.php @@ -12,7 +12,7 @@ namespace Predis\Command\Redis\Json; -use Predis\Command\Command as RedisCommand; +use Predis\Command\PrefixableCommand as RedisCommand; /** * @see https://redis.io/commands/json.numincrby/ @@ -25,4 +25,9 @@ class JSONNUMINCRBY extends RedisCommand { return 'JSON.NUMINCRBY'; } + + public function prefixKeys($prefix) + { + $this->applyPrefixForFirstArgument($prefix); + } } diff --git a/vendor/predis/predis/src/Command/Redis/Json/JSONOBJKEYS.php b/vendor/predis/predis/src/Command/Redis/Json/JSONOBJKEYS.php index 74a3b99..9e6d011 100644 --- a/vendor/predis/predis/src/Command/Redis/Json/JSONOBJKEYS.php +++ b/vendor/predis/predis/src/Command/Redis/Json/JSONOBJKEYS.php @@ -12,7 +12,7 @@ namespace Predis\Command\Redis\Json; -use Predis\Command\Command as RedisCommand; +use Predis\Command\PrefixableCommand as RedisCommand; /** * @see https://redis.io/commands/json.objkeys/ @@ -25,4 +25,9 @@ class JSONOBJKEYS extends RedisCommand { return 'JSON.OBJKEYS'; } + + public function prefixKeys($prefix) + { + $this->applyPrefixForFirstArgument($prefix); + } } diff --git a/vendor/predis/predis/src/Command/Redis/Json/JSONOBJLEN.php b/vendor/predis/predis/src/Command/Redis/Json/JSONOBJLEN.php index 352fc68..fc2327f 100644 --- a/vendor/predis/predis/src/Command/Redis/Json/JSONOBJLEN.php +++ b/vendor/predis/predis/src/Command/Redis/Json/JSONOBJLEN.php @@ -12,7 +12,7 @@ namespace Predis\Command\Redis\Json; -use Predis\Command\Command as RedisCommand; +use Predis\Command\PrefixableCommand as RedisCommand; /** * @see https://redis.io/commands/json.objlen/ @@ -25,4 +25,9 @@ class JSONOBJLEN extends RedisCommand { return 'JSON.OBJLEN'; } + + public function prefixKeys($prefix) + { + $this->applyPrefixForFirstArgument($prefix); + } } diff --git a/vendor/predis/predis/src/Command/Redis/Json/JSONRESP.php b/vendor/predis/predis/src/Command/Redis/Json/JSONRESP.php index f771580..6088fba 100644 --- a/vendor/predis/predis/src/Command/Redis/Json/JSONRESP.php +++ b/vendor/predis/predis/src/Command/Redis/Json/JSONRESP.php @@ -12,7 +12,7 @@ namespace Predis\Command\Redis\Json; -use Predis\Command\Command as RedisCommand; +use Predis\Command\PrefixableCommand as RedisCommand; /** * @see https://redis.io/commands/json.resp/ @@ -25,4 +25,9 @@ class JSONRESP extends RedisCommand { return 'JSON.RESP'; } + + public function prefixKeys($prefix) + { + $this->applyPrefixForFirstArgument($prefix); + } } diff --git a/vendor/predis/predis/src/Command/Redis/Json/JSONSET.php b/vendor/predis/predis/src/Command/Redis/Json/JSONSET.php index 43c683a..aec3a32 100644 --- a/vendor/predis/predis/src/Command/Redis/Json/JSONSET.php +++ b/vendor/predis/predis/src/Command/Redis/Json/JSONSET.php @@ -12,7 +12,7 @@ namespace Predis\Command\Redis\Json; -use Predis\Command\Command as RedisCommand; +use Predis\Command\PrefixableCommand as RedisCommand; use Predis\Command\Traits\Json\NxXxArgument; /** @@ -38,4 +38,9 @@ class JSONSET extends RedisCommand $this->setSubcommand($arguments); $this->filterArguments(); } + + public function prefixKeys($prefix) + { + $this->applyPrefixForFirstArgument($prefix); + } } diff --git a/vendor/predis/predis/src/Command/Redis/Json/JSONSTRAPPEND.php b/vendor/predis/predis/src/Command/Redis/Json/JSONSTRAPPEND.php index b717fc8..bb7aca3 100644 --- a/vendor/predis/predis/src/Command/Redis/Json/JSONSTRAPPEND.php +++ b/vendor/predis/predis/src/Command/Redis/Json/JSONSTRAPPEND.php @@ -12,7 +12,7 @@ namespace Predis\Command\Redis\Json; -use Predis\Command\Command as RedisCommand; +use Predis\Command\PrefixableCommand as RedisCommand; /** * @see https://redis.io/commands/json.strappend/ @@ -25,4 +25,9 @@ class JSONSTRAPPEND extends RedisCommand { return 'JSON.STRAPPEND'; } + + public function prefixKeys($prefix) + { + $this->applyPrefixForFirstArgument($prefix); + } } diff --git a/vendor/predis/predis/src/Command/Redis/Json/JSONSTRLEN.php b/vendor/predis/predis/src/Command/Redis/Json/JSONSTRLEN.php index c11ff08..dbfe2e8 100644 --- a/vendor/predis/predis/src/Command/Redis/Json/JSONSTRLEN.php +++ b/vendor/predis/predis/src/Command/Redis/Json/JSONSTRLEN.php @@ -12,7 +12,7 @@ namespace Predis\Command\Redis\Json; -use Predis\Command\Command as RedisCommand; +use Predis\Command\PrefixableCommand as RedisCommand; /** * @see https://redis.io/commands/json.strlen/ @@ -25,4 +25,9 @@ class JSONSTRLEN extends RedisCommand { return 'JSON.STRLEN'; } + + public function prefixKeys($prefix) + { + $this->applyPrefixForFirstArgument($prefix); + } } diff --git a/vendor/predis/predis/src/Command/Redis/Json/JSONTOGGLE.php b/vendor/predis/predis/src/Command/Redis/Json/JSONTOGGLE.php index b538c1c..74eda8e 100644 --- a/vendor/predis/predis/src/Command/Redis/Json/JSONTOGGLE.php +++ b/vendor/predis/predis/src/Command/Redis/Json/JSONTOGGLE.php @@ -12,7 +12,7 @@ namespace Predis\Command\Redis\Json; -use Predis\Command\Command as RedisCommand; +use Predis\Command\PrefixableCommand as RedisCommand; /** * @see https://redis.io/commands/json.toggle/ @@ -25,4 +25,9 @@ class JSONTOGGLE extends RedisCommand { return 'JSON.TOGGLE'; } + + public function prefixKeys($prefix) + { + $this->applyPrefixForFirstArgument($prefix); + } } diff --git a/vendor/predis/predis/src/Command/Redis/Json/JSONTYPE.php b/vendor/predis/predis/src/Command/Redis/Json/JSONTYPE.php index 76123d4..f903e44 100644 --- a/vendor/predis/predis/src/Command/Redis/Json/JSONTYPE.php +++ b/vendor/predis/predis/src/Command/Redis/Json/JSONTYPE.php @@ -12,7 +12,7 @@ namespace Predis\Command\Redis\Json; -use Predis\Command\Command as RedisCommand; +use Predis\Command\PrefixableCommand as RedisCommand; /** * @see https://redis.io/commands/json.type/ @@ -25,4 +25,9 @@ class JSONTYPE extends RedisCommand { return 'JSON.TYPE'; } + + public function prefixKeys($prefix) + { + $this->applyPrefixForFirstArgument($prefix); + } } diff --git a/vendor/predis/predis/src/Command/Redis/LMOVE.php b/vendor/predis/predis/src/Command/Redis/LMOVE.php index 95d906e..bd23249 100644 --- a/vendor/predis/predis/src/Command/Redis/LMOVE.php +++ b/vendor/predis/predis/src/Command/Redis/LMOVE.php @@ -12,7 +12,7 @@ namespace Predis\Command\Redis; -use Predis\Command\Command as RedisCommand; +use Predis\Command\PrefixableCommand as RedisCommand; class LMOVE extends RedisCommand { @@ -20,4 +20,14 @@ class LMOVE extends RedisCommand { return 'LMOVE'; } + + public function prefixKeys($prefix) + { + if ($arguments = $this->getArguments()) { + $arguments[0] = $prefix . $arguments[0]; + $arguments[1] = $prefix . $arguments[1]; + + $this->setRawArguments($arguments); + } + } } diff --git a/vendor/predis/predis/src/Command/Redis/SMISMEMBER.php b/vendor/predis/predis/src/Command/Redis/SMISMEMBER.php index f34d05d..8fefa2d 100644 --- a/vendor/predis/predis/src/Command/Redis/SMISMEMBER.php +++ b/vendor/predis/predis/src/Command/Redis/SMISMEMBER.php @@ -12,7 +12,7 @@ namespace Predis\Command\Redis; -use Predis\Command\Command as RedisCommand; +use Predis\Command\PrefixableCommand as RedisCommand; /** * @see https://redis.io/commands/smismember/ @@ -25,4 +25,9 @@ class SMISMEMBER extends RedisCommand { return 'SMISMEMBER'; } + + public function prefixKeys($prefix) + { + $this->applyPrefixForFirstArgument($prefix); + } } diff --git a/vendor/predis/predis/src/Command/Redis/Search/FTAGGREGATE.php b/vendor/predis/predis/src/Command/Redis/Search/FTAGGREGATE.php index f1c752a..58c4251 100644 --- a/vendor/predis/predis/src/Command/Redis/Search/FTAGGREGATE.php +++ b/vendor/predis/predis/src/Command/Redis/Search/FTAGGREGATE.php @@ -12,7 +12,7 @@ namespace Predis\Command\Redis\Search; -use Predis\Command\Command as RedisCommand; +use Predis\Command\PrefixableCommand as RedisCommand; /** * @see https://redis.io/commands/ft.aggregate/ @@ -50,4 +50,9 @@ class FTAGGREGATE extends RedisCommand $commandArguments )); } + + public function prefixKeys($prefix) + { + $this->applyPrefixForFirstArgument($prefix); + } } diff --git a/vendor/predis/predis/src/Command/Redis/Search/FTALIASADD.php b/vendor/predis/predis/src/Command/Redis/Search/FTALIASADD.php index 12b1945..84e5f82 100644 --- a/vendor/predis/predis/src/Command/Redis/Search/FTALIASADD.php +++ b/vendor/predis/predis/src/Command/Redis/Search/FTALIASADD.php @@ -12,7 +12,7 @@ namespace Predis\Command\Redis\Search; -use Predis\Command\Command as RedisCommand; +use Predis\Command\PrefixableCommand as RedisCommand; /** * @see https://redis.io/commands/ft.aliasadd/ @@ -25,4 +25,9 @@ class FTALIASADD extends RedisCommand { return 'FT.ALIASADD'; } + + public function prefixKeys($prefix) + { + $this->applyPrefixForAllArguments($prefix); + } } diff --git a/vendor/predis/predis/src/Command/Redis/Search/FTALIASDEL.php b/vendor/predis/predis/src/Command/Redis/Search/FTALIASDEL.php index 1ef3224..fe2da39 100644 --- a/vendor/predis/predis/src/Command/Redis/Search/FTALIASDEL.php +++ b/vendor/predis/predis/src/Command/Redis/Search/FTALIASDEL.php @@ -12,7 +12,7 @@ namespace Predis\Command\Redis\Search; -use Predis\Command\Command as RedisCommand; +use Predis\Command\PrefixableCommand as RedisCommand; /** * @see https://redis.io/commands/ft.aliasdel/ @@ -25,4 +25,9 @@ class FTALIASDEL extends RedisCommand { return 'FT.ALIASDEL'; } + + public function prefixKeys($prefix) + { + $this->applyPrefixForFirstArgument($prefix); + } } diff --git a/vendor/predis/predis/src/Command/Redis/Search/FTALIASUPDATE.php b/vendor/predis/predis/src/Command/Redis/Search/FTALIASUPDATE.php index 28d522b..0a89c8e 100644 --- a/vendor/predis/predis/src/Command/Redis/Search/FTALIASUPDATE.php +++ b/vendor/predis/predis/src/Command/Redis/Search/FTALIASUPDATE.php @@ -12,7 +12,7 @@ namespace Predis\Command\Redis\Search; -use Predis\Command\Command as RedisCommand; +use Predis\Command\PrefixableCommand as RedisCommand; /** * @see https://redis.io/commands/ft.aliasupdate/ @@ -26,4 +26,9 @@ class FTALIASUPDATE extends RedisCommand { return 'FT.ALIASUPDATE'; } + + public function prefixKeys($prefix) + { + $this->applyPrefixForAllArguments($prefix); + } } diff --git a/vendor/predis/predis/src/Command/Redis/Search/FTALTER.php b/vendor/predis/predis/src/Command/Redis/Search/FTALTER.php index a209af6..5d261cb 100644 --- a/vendor/predis/predis/src/Command/Redis/Search/FTALTER.php +++ b/vendor/predis/predis/src/Command/Redis/Search/FTALTER.php @@ -13,7 +13,7 @@ namespace Predis\Command\Redis\Search; use Predis\Command\Argument\Search\SchemaFields\FieldInterface; -use Predis\Command\Command as RedisCommand; +use Predis\Command\PrefixableCommand as RedisCommand; class FTALTER extends RedisCommand { @@ -39,4 +39,9 @@ class FTALTER extends RedisCommand $schema )); } + + public function prefixKeys($prefix) + { + $this->applyPrefixForFirstArgument($prefix); + } } diff --git a/vendor/predis/predis/src/Command/Redis/Search/FTCREATE.php b/vendor/predis/predis/src/Command/Redis/Search/FTCREATE.php index 8d2a7ee..d716ab6 100644 --- a/vendor/predis/predis/src/Command/Redis/Search/FTCREATE.php +++ b/vendor/predis/predis/src/Command/Redis/Search/FTCREATE.php @@ -13,7 +13,7 @@ namespace Predis\Command\Redis\Search; use Predis\Command\Argument\Search\SchemaFields\FieldInterface; -use Predis\Command\Command as RedisCommand; +use Predis\Command\PrefixableCommand as RedisCommand; /** * @see https://redis.io/commands/ft.create/ @@ -44,4 +44,9 @@ class FTCREATE extends RedisCommand $schema )); } + + public function prefixKeys($prefix) + { + $this->applyPrefixForFirstArgument($prefix); + } } diff --git a/vendor/predis/predis/src/Command/Redis/Search/FTCURSOR.php b/vendor/predis/predis/src/Command/Redis/Search/FTCURSOR.php index 5794fa8..053fc9f 100644 --- a/vendor/predis/predis/src/Command/Redis/Search/FTCURSOR.php +++ b/vendor/predis/predis/src/Command/Redis/Search/FTCURSOR.php @@ -12,7 +12,7 @@ namespace Predis\Command\Redis\Search; -use Predis\Command\Command as RedisCommand; +use Predis\Command\PrefixableCommand as RedisCommand; class FTCURSOR extends RedisCommand { @@ -31,4 +31,9 @@ class FTCURSOR extends RedisCommand $commandArguments )); } + + public function prefixKeys($prefix) + { + $this->applyPrefixForFirstArgument($prefix); + } } diff --git a/vendor/predis/predis/src/Command/Redis/Search/FTDICTADD.php b/vendor/predis/predis/src/Command/Redis/Search/FTDICTADD.php index 2c48ea6..b2bfc71 100644 --- a/vendor/predis/predis/src/Command/Redis/Search/FTDICTADD.php +++ b/vendor/predis/predis/src/Command/Redis/Search/FTDICTADD.php @@ -12,7 +12,7 @@ namespace Predis\Command\Redis\Search; -use Predis\Command\Command as RedisCommand; +use Predis\Command\PrefixableCommand as RedisCommand; /** * @see https://redis.io/commands/ft.dictadd/ @@ -25,4 +25,9 @@ class FTDICTADD extends RedisCommand { return 'FT.DICTADD'; } + + public function prefixKeys($prefix) + { + $this->applyPrefixForFirstArgument($prefix); + } } diff --git a/vendor/predis/predis/src/Command/Redis/Search/FTDICTDEL.php b/vendor/predis/predis/src/Command/Redis/Search/FTDICTDEL.php index a18cae3..ca6fed4 100644 --- a/vendor/predis/predis/src/Command/Redis/Search/FTDICTDEL.php +++ b/vendor/predis/predis/src/Command/Redis/Search/FTDICTDEL.php @@ -12,7 +12,7 @@ namespace Predis\Command\Redis\Search; -use Predis\Command\Command as RedisCommand; +use Predis\Command\PrefixableCommand as RedisCommand; /** * @see https://redis.io/commands/ft.dictdel/ @@ -25,4 +25,9 @@ class FTDICTDEL extends RedisCommand { return 'FT.DICTDEL'; } + + public function prefixKeys($prefix) + { + $this->applyPrefixForFirstArgument($prefix); + } } diff --git a/vendor/predis/predis/src/Command/Redis/Search/FTDICTDUMP.php b/vendor/predis/predis/src/Command/Redis/Search/FTDICTDUMP.php index b8323cf..e8381c6 100644 --- a/vendor/predis/predis/src/Command/Redis/Search/FTDICTDUMP.php +++ b/vendor/predis/predis/src/Command/Redis/Search/FTDICTDUMP.php @@ -12,7 +12,7 @@ namespace Predis\Command\Redis\Search; -use Predis\Command\Command as RedisCommand; +use Predis\Command\PrefixableCommand as RedisCommand; /** * @see https://redis.io/commands/ft.dictdump/ @@ -25,4 +25,9 @@ class FTDICTDUMP extends RedisCommand { return 'FT.DICTDUMP'; } + + public function prefixKeys($prefix) + { + $this->applyPrefixForFirstArgument($prefix); + } } diff --git a/vendor/predis/predis/src/Command/Redis/Search/FTDROPINDEX.php b/vendor/predis/predis/src/Command/Redis/Search/FTDROPINDEX.php index 6282bda..075823b 100644 --- a/vendor/predis/predis/src/Command/Redis/Search/FTDROPINDEX.php +++ b/vendor/predis/predis/src/Command/Redis/Search/FTDROPINDEX.php @@ -12,7 +12,7 @@ namespace Predis\Command\Redis\Search; -use Predis\Command\Command as RedisCommand; +use Predis\Command\PrefixableCommand as RedisCommand; class FTDROPINDEX extends RedisCommand { @@ -35,4 +35,9 @@ class FTDROPINDEX extends RedisCommand $commandArguments )); } + + public function prefixKeys($prefix) + { + $this->applyPrefixForFirstArgument($prefix); + } } diff --git a/vendor/predis/predis/src/Command/Redis/Search/FTEXPLAIN.php b/vendor/predis/predis/src/Command/Redis/Search/FTEXPLAIN.php index e2834cb..6802875 100644 --- a/vendor/predis/predis/src/Command/Redis/Search/FTEXPLAIN.php +++ b/vendor/predis/predis/src/Command/Redis/Search/FTEXPLAIN.php @@ -12,7 +12,7 @@ namespace Predis\Command\Redis\Search; -use Predis\Command\Command as RedisCommand; +use Predis\Command\PrefixableCommand as RedisCommand; /** * @see https://redis.io/commands/ft.explain/ @@ -49,4 +49,9 @@ class FTEXPLAIN extends RedisCommand $commandArguments )); } + + public function prefixKeys($prefix) + { + $this->applyPrefixForFirstArgument($prefix); + } } diff --git a/vendor/predis/predis/src/Command/Redis/Search/FTINFO.php b/vendor/predis/predis/src/Command/Redis/Search/FTINFO.php index 26f6de6..a9df065 100644 --- a/vendor/predis/predis/src/Command/Redis/Search/FTINFO.php +++ b/vendor/predis/predis/src/Command/Redis/Search/FTINFO.php @@ -12,7 +12,7 @@ namespace Predis\Command\Redis\Search; -use Predis\Command\Command as RedisCommand; +use Predis\Command\PrefixableCommand as RedisCommand; /** * @see https://redis.io/commands/ft.info/ @@ -25,4 +25,9 @@ class FTINFO extends RedisCommand { return 'FT.INFO'; } + + public function prefixKeys($prefix) + { + $this->applyPrefixForFirstArgument($prefix); + } } diff --git a/vendor/predis/predis/src/Command/Redis/Search/FTPROFILE.php b/vendor/predis/predis/src/Command/Redis/Search/FTPROFILE.php index e361807..0f2d29f 100644 --- a/vendor/predis/predis/src/Command/Redis/Search/FTPROFILE.php +++ b/vendor/predis/predis/src/Command/Redis/Search/FTPROFILE.php @@ -12,7 +12,7 @@ namespace Predis\Command\Redis\Search; -use Predis\Command\Command as RedisCommand; +use Predis\Command\PrefixableCommand as RedisCommand; /** * @see https://redis.io/commands/ft.profile/ @@ -35,4 +35,9 @@ class FTPROFILE extends RedisCommand $arguments->toArray() )); } + + public function prefixKeys($prefix) + { + $this->applyPrefixForFirstArgument($prefix); + } } diff --git a/vendor/predis/predis/src/Command/Redis/Search/FTSEARCH.php b/vendor/predis/predis/src/Command/Redis/Search/FTSEARCH.php index 3e2cd13..992caa3 100644 --- a/vendor/predis/predis/src/Command/Redis/Search/FTSEARCH.php +++ b/vendor/predis/predis/src/Command/Redis/Search/FTSEARCH.php @@ -12,7 +12,7 @@ namespace Predis\Command\Redis\Search; -use Predis\Command\Command as RedisCommand; +use Predis\Command\PrefixableCommand as RedisCommand; /** * @see https://redis.io/commands/ft.search/ @@ -49,4 +49,9 @@ class FTSEARCH extends RedisCommand $commandArguments )); } + + public function prefixKeys($prefix) + { + $this->applyPrefixForFirstArgument($prefix); + } } diff --git a/vendor/predis/predis/src/Command/Redis/Search/FTSPELLCHECK.php b/vendor/predis/predis/src/Command/Redis/Search/FTSPELLCHECK.php index 431c7b8..5c25049 100644 --- a/vendor/predis/predis/src/Command/Redis/Search/FTSPELLCHECK.php +++ b/vendor/predis/predis/src/Command/Redis/Search/FTSPELLCHECK.php @@ -12,7 +12,7 @@ namespace Predis\Command\Redis\Search; -use Predis\Command\Command as RedisCommand; +use Predis\Command\PrefixableCommand as RedisCommand; class FTSPELLCHECK extends RedisCommand { @@ -48,4 +48,9 @@ class FTSPELLCHECK extends RedisCommand $commandArguments )); } + + public function prefixKeys($prefix) + { + $this->applyPrefixForFirstArgument($prefix); + } } diff --git a/vendor/predis/predis/src/Command/Redis/Search/FTSYNDUMP.php b/vendor/predis/predis/src/Command/Redis/Search/FTSYNDUMP.php index 59ebafa..ed33ec1 100644 --- a/vendor/predis/predis/src/Command/Redis/Search/FTSYNDUMP.php +++ b/vendor/predis/predis/src/Command/Redis/Search/FTSYNDUMP.php @@ -12,7 +12,7 @@ namespace Predis\Command\Redis\Search; -use Predis\Command\Command as RedisCommand; +use Predis\Command\PrefixableCommand as RedisCommand; /** * @see https://redis.io/commands/ft.syndump/ @@ -25,4 +25,9 @@ class FTSYNDUMP extends RedisCommand { return 'FT.SYNDUMP'; } + + public function prefixKeys($prefix) + { + $this->applyPrefixForFirstArgument($prefix); + } } diff --git a/vendor/predis/predis/src/Command/Redis/Search/FTSYNUPDATE.php b/vendor/predis/predis/src/Command/Redis/Search/FTSYNUPDATE.php index 4302e5d..e83cf9f 100644 --- a/vendor/predis/predis/src/Command/Redis/Search/FTSYNUPDATE.php +++ b/vendor/predis/predis/src/Command/Redis/Search/FTSYNUPDATE.php @@ -12,7 +12,7 @@ namespace Predis\Command\Redis\Search; -use Predis\Command\Command as RedisCommand; +use Predis\Command\PrefixableCommand as RedisCommand; /** * @see https://redis.io/commands/ft.synupdate/ @@ -43,4 +43,9 @@ class FTSYNUPDATE extends RedisCommand $terms )); } + + public function prefixKeys($prefix) + { + $this->applyPrefixForFirstArgument($prefix); + } } diff --git a/vendor/predis/predis/src/Command/Redis/Search/FTTAGVALS.php b/vendor/predis/predis/src/Command/Redis/Search/FTTAGVALS.php index 0ec2c9d..c97ec56 100644 --- a/vendor/predis/predis/src/Command/Redis/Search/FTTAGVALS.php +++ b/vendor/predis/predis/src/Command/Redis/Search/FTTAGVALS.php @@ -12,7 +12,7 @@ namespace Predis\Command\Redis\Search; -use Predis\Command\Command as RedisCommand; +use Predis\Command\PrefixableCommand as RedisCommand; /** * @see https://redis.io/commands/ft.tagvals/ @@ -25,4 +25,9 @@ class FTTAGVALS extends RedisCommand { return 'FT.TAGVALS'; } + + public function prefixKeys($prefix) + { + $this->applyPrefixForFirstArgument($prefix); + } } diff --git a/vendor/predis/predis/src/Command/Redis/TDigest/TDIGESTADD.php b/vendor/predis/predis/src/Command/Redis/TDigest/TDIGESTADD.php index 5a060d9..6b0bb62 100644 --- a/vendor/predis/predis/src/Command/Redis/TDigest/TDIGESTADD.php +++ b/vendor/predis/predis/src/Command/Redis/TDigest/TDIGESTADD.php @@ -12,7 +12,7 @@ namespace Predis\Command\Redis\TDigest; -use Predis\Command\Command as RedisCommand; +use Predis\Command\PrefixableCommand as RedisCommand; /** * @see https://redis.io/commands/tdigest.add/ @@ -25,4 +25,9 @@ class TDIGESTADD extends RedisCommand { return 'TDIGEST.ADD'; } + + public function prefixKeys($prefix) + { + $this->applyPrefixForFirstArgument($prefix); + } } diff --git a/vendor/predis/predis/src/Command/Redis/TDigest/TDIGESTBYRANK.php b/vendor/predis/predis/src/Command/Redis/TDigest/TDIGESTBYRANK.php index 7e36602..2ca9730 100644 --- a/vendor/predis/predis/src/Command/Redis/TDigest/TDIGESTBYRANK.php +++ b/vendor/predis/predis/src/Command/Redis/TDigest/TDIGESTBYRANK.php @@ -12,7 +12,7 @@ namespace Predis\Command\Redis\TDigest; -use Predis\Command\Command as RedisCommand; +use Predis\Command\PrefixableCommand as RedisCommand; /** * @see https://redis.io/commands/tdigest.byrank/ @@ -52,4 +52,9 @@ class TDIGESTBYRANK extends RedisCommand } }, $data); } + + public function prefixKeys($prefix) + { + $this->applyPrefixForFirstArgument($prefix); + } } diff --git a/vendor/predis/predis/src/Command/Redis/TDigest/TDIGESTBYREVRANK.php b/vendor/predis/predis/src/Command/Redis/TDigest/TDIGESTBYREVRANK.php index e3eca0e..ebe9763 100644 --- a/vendor/predis/predis/src/Command/Redis/TDigest/TDIGESTBYREVRANK.php +++ b/vendor/predis/predis/src/Command/Redis/TDigest/TDIGESTBYREVRANK.php @@ -12,7 +12,7 @@ namespace Predis\Command\Redis\TDigest; -use Predis\Command\Command as RedisCommand; +use Predis\Command\PrefixableCommand as RedisCommand; /** * @see https://redis.io/commands/tdigest.byrevrank/ @@ -52,4 +52,9 @@ class TDIGESTBYREVRANK extends RedisCommand } }, $data); } + + public function prefixKeys($prefix) + { + $this->applyPrefixForFirstArgument($prefix); + } } diff --git a/vendor/predis/predis/src/Command/Redis/TDigest/TDIGESTCDF.php b/vendor/predis/predis/src/Command/Redis/TDigest/TDIGESTCDF.php index 9da737a..3cf22a5 100644 --- a/vendor/predis/predis/src/Command/Redis/TDigest/TDIGESTCDF.php +++ b/vendor/predis/predis/src/Command/Redis/TDigest/TDIGESTCDF.php @@ -12,7 +12,7 @@ namespace Predis\Command\Redis\TDigest; -use Predis\Command\Command as RedisCommand; +use Predis\Command\PrefixableCommand as RedisCommand; /** * @see https://redis.io/commands/tdigest.cdf/ @@ -54,4 +54,9 @@ class TDIGESTCDF extends RedisCommand } }, $data); } + + public function prefixKeys($prefix) + { + $this->applyPrefixForFirstArgument($prefix); + } } diff --git a/vendor/predis/predis/src/Command/Redis/TDigest/TDIGESTCREATE.php b/vendor/predis/predis/src/Command/Redis/TDigest/TDIGESTCREATE.php index d975ee3..0ecd181 100644 --- a/vendor/predis/predis/src/Command/Redis/TDigest/TDIGESTCREATE.php +++ b/vendor/predis/predis/src/Command/Redis/TDigest/TDIGESTCREATE.php @@ -12,7 +12,7 @@ namespace Predis\Command\Redis\TDigest; -use Predis\Command\Command as RedisCommand; +use Predis\Command\PrefixableCommand as RedisCommand; /** * @see https://redis.io/commands/tdigest.create/ @@ -37,4 +37,9 @@ class TDIGESTCREATE extends RedisCommand parent::setArguments($arguments); } + + public function prefixKeys($prefix) + { + $this->applyPrefixForFirstArgument($prefix); + } } diff --git a/vendor/predis/predis/src/Command/Redis/TDigest/TDIGESTINFO.php b/vendor/predis/predis/src/Command/Redis/TDigest/TDIGESTINFO.php index 93c9829..6888241 100644 --- a/vendor/predis/predis/src/Command/Redis/TDigest/TDIGESTINFO.php +++ b/vendor/predis/predis/src/Command/Redis/TDigest/TDIGESTINFO.php @@ -12,7 +12,7 @@ namespace Predis\Command\Redis\TDigest; -use Predis\Command\Command as RedisCommand; +use Predis\Command\PrefixableCommand as RedisCommand; /** * @see https://redis.io/commands/tdigest.info/ @@ -38,4 +38,9 @@ class TDIGESTINFO extends RedisCommand return $result; } + + public function prefixKeys($prefix) + { + $this->applyPrefixForFirstArgument($prefix); + } } diff --git a/vendor/predis/predis/src/Command/Redis/TDigest/TDIGESTMAX.php b/vendor/predis/predis/src/Command/Redis/TDigest/TDIGESTMAX.php index f648845..cea35bd 100644 --- a/vendor/predis/predis/src/Command/Redis/TDigest/TDIGESTMAX.php +++ b/vendor/predis/predis/src/Command/Redis/TDigest/TDIGESTMAX.php @@ -12,7 +12,7 @@ namespace Predis\Command\Redis\TDigest; -use Predis\Command\Command as RedisCommand; +use Predis\Command\PrefixableCommand as RedisCommand; /** * @see https://redis.io/commands/tdigest.max/ @@ -46,4 +46,9 @@ class TDIGESTMAX extends RedisCommand default: return $data; } } + + public function prefixKeys($prefix) + { + $this->applyPrefixForFirstArgument($prefix); + } } diff --git a/vendor/predis/predis/src/Command/Redis/TDigest/TDIGESTMERGE.php b/vendor/predis/predis/src/Command/Redis/TDigest/TDIGESTMERGE.php index 5c60ac3..1baf1e9 100644 --- a/vendor/predis/predis/src/Command/Redis/TDigest/TDIGESTMERGE.php +++ b/vendor/predis/predis/src/Command/Redis/TDigest/TDIGESTMERGE.php @@ -12,7 +12,7 @@ namespace Predis\Command\Redis\TDigest; -use Predis\Command\Command as RedisCommand; +use Predis\Command\PrefixableCommand as RedisCommand; /** * @see https://redis.io/commands/tdigest.merge/ @@ -40,4 +40,17 @@ class TDIGESTMERGE extends RedisCommand parent::setArguments($processedArguments); } + + public function prefixKeys($prefix) + { + if ($arguments = $this->getArguments()) { + $arguments[0] = $prefix . $arguments[0]; + + for ($i = 2, $iMax = (int) $arguments[1] + 2; $i < $iMax; $i++) { + $arguments[$i] = $prefix . $arguments[$i]; + } + + $this->setRawArguments($arguments); + } + } } diff --git a/vendor/predis/predis/src/Command/Redis/TDigest/TDIGESTMIN.php b/vendor/predis/predis/src/Command/Redis/TDigest/TDIGESTMIN.php index 77f1d5f..d4d9b4b 100644 --- a/vendor/predis/predis/src/Command/Redis/TDigest/TDIGESTMIN.php +++ b/vendor/predis/predis/src/Command/Redis/TDigest/TDIGESTMIN.php @@ -12,7 +12,7 @@ namespace Predis\Command\Redis\TDigest; -use Predis\Command\Command as RedisCommand; +use Predis\Command\PrefixableCommand as RedisCommand; /** * @see https://redis.io/commands/tdigest.min/ @@ -46,4 +46,9 @@ class TDIGESTMIN extends RedisCommand default: return $data; } } + + public function prefixKeys($prefix) + { + $this->applyPrefixForFirstArgument($prefix); + } } diff --git a/vendor/predis/predis/src/Command/Redis/TDigest/TDIGESTQUANTILE.php b/vendor/predis/predis/src/Command/Redis/TDigest/TDIGESTQUANTILE.php index dae3c29..cd7683d 100644 --- a/vendor/predis/predis/src/Command/Redis/TDigest/TDIGESTQUANTILE.php +++ b/vendor/predis/predis/src/Command/Redis/TDigest/TDIGESTQUANTILE.php @@ -12,7 +12,7 @@ namespace Predis\Command\Redis\TDigest; -use Predis\Command\Command as RedisCommand; +use Predis\Command\PrefixableCommand as RedisCommand; /** * @see https://redis.io/commands/tdigest.quantile/ @@ -52,4 +52,9 @@ class TDIGESTQUANTILE extends RedisCommand } }, $data); } + + public function prefixKeys($prefix) + { + $this->applyPrefixForFirstArgument($prefix); + } } diff --git a/vendor/predis/predis/src/Command/Redis/TDigest/TDIGESTRANK.php b/vendor/predis/predis/src/Command/Redis/TDigest/TDIGESTRANK.php index e0c3255..016450f 100644 --- a/vendor/predis/predis/src/Command/Redis/TDigest/TDIGESTRANK.php +++ b/vendor/predis/predis/src/Command/Redis/TDigest/TDIGESTRANK.php @@ -12,7 +12,7 @@ namespace Predis\Command\Redis\TDigest; -use Predis\Command\Command as RedisCommand; +use Predis\Command\PrefixableCommand as RedisCommand; /** * @see https://redis.io/commands/tdigest.rank/ @@ -27,4 +27,9 @@ class TDIGESTRANK extends RedisCommand { return 'TDIGEST.RANK'; } + + public function prefixKeys($prefix) + { + $this->applyPrefixForFirstArgument($prefix); + } } diff --git a/vendor/predis/predis/src/Command/Redis/TDigest/TDIGESTRESET.php b/vendor/predis/predis/src/Command/Redis/TDigest/TDIGESTRESET.php index 20fb874..4a12911 100644 --- a/vendor/predis/predis/src/Command/Redis/TDigest/TDIGESTRESET.php +++ b/vendor/predis/predis/src/Command/Redis/TDigest/TDIGESTRESET.php @@ -12,7 +12,7 @@ namespace Predis\Command\Redis\TDigest; -use Predis\Command\Command as RedisCommand; +use Predis\Command\PrefixableCommand as RedisCommand; /** * @see https://redis.io/commands/tdigest.reset/ @@ -25,4 +25,9 @@ class TDIGESTRESET extends RedisCommand { return 'TDIGEST.RESET'; } + + public function prefixKeys($prefix) + { + $this->applyPrefixForFirstArgument($prefix); + } } diff --git a/vendor/predis/predis/src/Command/Redis/TDigest/TDIGESTREVRANK.php b/vendor/predis/predis/src/Command/Redis/TDigest/TDIGESTREVRANK.php index e6edbd8..926781d 100644 --- a/vendor/predis/predis/src/Command/Redis/TDigest/TDIGESTREVRANK.php +++ b/vendor/predis/predis/src/Command/Redis/TDigest/TDIGESTREVRANK.php @@ -12,7 +12,7 @@ namespace Predis\Command\Redis\TDigest; -use Predis\Command\Command as RedisCommand; +use Predis\Command\PrefixableCommand as RedisCommand; /** * @see https://redis.io/commands/tdigest.revrank/ @@ -27,4 +27,9 @@ class TDIGESTREVRANK extends RedisCommand { return 'TDIGEST.REVRANK'; } + + public function prefixKeys($prefix) + { + $this->applyPrefixForFirstArgument($prefix); + } } diff --git a/vendor/predis/predis/src/Command/Redis/TDigest/TDIGESTTRIMMED_MEAN.php b/vendor/predis/predis/src/Command/Redis/TDigest/TDIGESTTRIMMED_MEAN.php index 2490eef..793ad0c 100644 --- a/vendor/predis/predis/src/Command/Redis/TDigest/TDIGESTTRIMMED_MEAN.php +++ b/vendor/predis/predis/src/Command/Redis/TDigest/TDIGESTTRIMMED_MEAN.php @@ -12,7 +12,7 @@ namespace Predis\Command\Redis\TDigest; -use Predis\Command\Command as RedisCommand; +use Predis\Command\PrefixableCommand as RedisCommand; /** * @see https://redis.io/commands/tdigest.trimmed_mean/ @@ -47,4 +47,9 @@ class TDIGESTTRIMMED_MEAN extends RedisCommand default: return $data; } } + + public function prefixKeys($prefix) + { + $this->applyPrefixForFirstArgument($prefix); + } } diff --git a/vendor/predis/predis/src/Command/Redis/TimeSeries/TSADD.php b/vendor/predis/predis/src/Command/Redis/TimeSeries/TSADD.php index 68707e5..9f2bb82 100644 --- a/vendor/predis/predis/src/Command/Redis/TimeSeries/TSADD.php +++ b/vendor/predis/predis/src/Command/Redis/TimeSeries/TSADD.php @@ -12,7 +12,7 @@ namespace Predis\Command\Redis\TimeSeries; -use Predis\Command\Command as RedisCommand; +use Predis\Command\PrefixableCommand as RedisCommand; /** * @see https://redis.io/commands/ts.add/ @@ -36,4 +36,9 @@ class TSADD extends RedisCommand $commandArguments )); } + + public function prefixKeys($prefix) + { + $this->applyPrefixForFirstArgument($prefix); + } } diff --git a/vendor/predis/predis/src/Command/Redis/TimeSeries/TSALTER.php b/vendor/predis/predis/src/Command/Redis/TimeSeries/TSALTER.php index 9d46fe2..f2587bf 100644 --- a/vendor/predis/predis/src/Command/Redis/TimeSeries/TSALTER.php +++ b/vendor/predis/predis/src/Command/Redis/TimeSeries/TSALTER.php @@ -12,7 +12,7 @@ namespace Predis\Command\Redis\TimeSeries; -use Predis\Command\Command as RedisCommand; +use Predis\Command\PrefixableCommand as RedisCommand; /** * @see https://redis.io/commands/ts.alter/ @@ -36,4 +36,9 @@ class TSALTER extends RedisCommand $commandArguments )); } + + public function prefixKeys($prefix) + { + $this->applyPrefixForFirstArgument($prefix); + } } diff --git a/vendor/predis/predis/src/Command/Redis/TimeSeries/TSCREATE.php b/vendor/predis/predis/src/Command/Redis/TimeSeries/TSCREATE.php index 29f815c..540d39d 100644 --- a/vendor/predis/predis/src/Command/Redis/TimeSeries/TSCREATE.php +++ b/vendor/predis/predis/src/Command/Redis/TimeSeries/TSCREATE.php @@ -12,7 +12,7 @@ namespace Predis\Command\Redis\TimeSeries; -use Predis\Command\Command as RedisCommand; +use Predis\Command\PrefixableCommand as RedisCommand; /** * @see https://redis.io/commands/ts.create/ @@ -36,4 +36,9 @@ class TSCREATE extends RedisCommand $commandArguments )); } + + public function prefixKeys($prefix) + { + $this->applyPrefixForFirstArgument($prefix); + } } diff --git a/vendor/predis/predis/src/Command/Redis/TimeSeries/TSCREATERULE.php b/vendor/predis/predis/src/Command/Redis/TimeSeries/TSCREATERULE.php index 9e9adce..0005f01 100644 --- a/vendor/predis/predis/src/Command/Redis/TimeSeries/TSCREATERULE.php +++ b/vendor/predis/predis/src/Command/Redis/TimeSeries/TSCREATERULE.php @@ -12,7 +12,7 @@ namespace Predis\Command\Redis\TimeSeries; -use Predis\Command\Command as RedisCommand; +use Predis\Command\PrefixableCommand as RedisCommand; /** * @see https://redis.io/commands/ts.createrule/ @@ -37,4 +37,14 @@ class TSCREATERULE extends RedisCommand parent::setArguments($processedArguments); } + + public function prefixKeys($prefix) + { + if ($arguments = $this->getArguments()) { + $arguments[0] = $prefix . $arguments[0]; + $arguments[1] = $prefix . $arguments[1]; + + $this->setRawArguments($arguments); + } + } } diff --git a/vendor/predis/predis/src/Command/Redis/TimeSeries/TSDECRBY.php b/vendor/predis/predis/src/Command/Redis/TimeSeries/TSDECRBY.php index 5978794..d311788 100644 --- a/vendor/predis/predis/src/Command/Redis/TimeSeries/TSDECRBY.php +++ b/vendor/predis/predis/src/Command/Redis/TimeSeries/TSDECRBY.php @@ -12,7 +12,7 @@ namespace Predis\Command\Redis\TimeSeries; -use Predis\Command\Command as RedisCommand; +use Predis\Command\PrefixableCommand as RedisCommand; /** * @see https://redis.io/commands/ts.decrby/ @@ -38,4 +38,9 @@ class TSDECRBY extends RedisCommand $commandArguments )); } + + public function prefixKeys($prefix) + { + $this->applyPrefixForFirstArgument($prefix); + } } diff --git a/vendor/predis/predis/src/Command/Redis/TimeSeries/TSDEL.php b/vendor/predis/predis/src/Command/Redis/TimeSeries/TSDEL.php index 83b9639..6e28d56 100644 --- a/vendor/predis/predis/src/Command/Redis/TimeSeries/TSDEL.php +++ b/vendor/predis/predis/src/Command/Redis/TimeSeries/TSDEL.php @@ -12,7 +12,7 @@ namespace Predis\Command\Redis\TimeSeries; -use Predis\Command\Command as RedisCommand; +use Predis\Command\PrefixableCommand as RedisCommand; /** * @see https://redis.io/commands/ts.del/ @@ -25,4 +25,9 @@ class TSDEL extends RedisCommand { return 'TS.DEL'; } + + public function prefixKeys($prefix) + { + $this->applyPrefixForFirstArgument($prefix); + } } diff --git a/vendor/predis/predis/src/Command/Redis/TimeSeries/TSDELETERULE.php b/vendor/predis/predis/src/Command/Redis/TimeSeries/TSDELETERULE.php index c24643c..2552dcf 100644 --- a/vendor/predis/predis/src/Command/Redis/TimeSeries/TSDELETERULE.php +++ b/vendor/predis/predis/src/Command/Redis/TimeSeries/TSDELETERULE.php @@ -12,7 +12,7 @@ namespace Predis\Command\Redis\TimeSeries; -use Predis\Command\Command as RedisCommand; +use Predis\Command\PrefixableCommand as RedisCommand; /** * @see https://redis.io/commands/ts.deleterule/ @@ -25,4 +25,9 @@ class TSDELETERULE extends RedisCommand { return 'TS.DELETERULE'; } + + public function prefixKeys($prefix) + { + $this->applyPrefixForFirstArgument($prefix); + } } diff --git a/vendor/predis/predis/src/Command/Redis/TimeSeries/TSGET.php b/vendor/predis/predis/src/Command/Redis/TimeSeries/TSGET.php index 13f8499..b3b11c1 100644 --- a/vendor/predis/predis/src/Command/Redis/TimeSeries/TSGET.php +++ b/vendor/predis/predis/src/Command/Redis/TimeSeries/TSGET.php @@ -12,7 +12,7 @@ namespace Predis\Command\Redis\TimeSeries; -use Predis\Command\Command as RedisCommand; +use Predis\Command\PrefixableCommand as RedisCommand; /** * @see https://redis.io/commands/ts.get/ @@ -36,4 +36,9 @@ class TSGET extends RedisCommand $commandArguments )); } + + public function prefixKeys($prefix) + { + $this->applyPrefixForFirstArgument($prefix); + } } diff --git a/vendor/predis/predis/src/Command/Redis/TimeSeries/TSINCRBY.php b/vendor/predis/predis/src/Command/Redis/TimeSeries/TSINCRBY.php index e1bd0e0..df5b604 100644 --- a/vendor/predis/predis/src/Command/Redis/TimeSeries/TSINCRBY.php +++ b/vendor/predis/predis/src/Command/Redis/TimeSeries/TSINCRBY.php @@ -12,7 +12,7 @@ namespace Predis\Command\Redis\TimeSeries; -use Predis\Command\Command as RedisCommand; +use Predis\Command\PrefixableCommand as RedisCommand; /** * @see https://redis.io/commands/ts.incrby/ @@ -38,4 +38,9 @@ class TSINCRBY extends RedisCommand $commandArguments )); } + + public function prefixKeys($prefix) + { + $this->applyPrefixForFirstArgument($prefix); + } } diff --git a/vendor/predis/predis/src/Command/Redis/TimeSeries/TSINFO.php b/vendor/predis/predis/src/Command/Redis/TimeSeries/TSINFO.php index 5ce146a..78ea149 100644 --- a/vendor/predis/predis/src/Command/Redis/TimeSeries/TSINFO.php +++ b/vendor/predis/predis/src/Command/Redis/TimeSeries/TSINFO.php @@ -12,7 +12,7 @@ namespace Predis\Command\Redis\TimeSeries; -use Predis\Command\Command as RedisCommand; +use Predis\Command\PrefixableCommand as RedisCommand; /** * @see https://redis.io/commands/ts.info/ @@ -36,4 +36,9 @@ class TSINFO extends RedisCommand $commandArguments )); } + + public function prefixKeys($prefix) + { + $this->applyPrefixForFirstArgument($prefix); + } } diff --git a/vendor/predis/predis/src/Command/Redis/TimeSeries/TSMADD.php b/vendor/predis/predis/src/Command/Redis/TimeSeries/TSMADD.php index 02fc03e..e37d75c 100644 --- a/vendor/predis/predis/src/Command/Redis/TimeSeries/TSMADD.php +++ b/vendor/predis/predis/src/Command/Redis/TimeSeries/TSMADD.php @@ -12,7 +12,7 @@ namespace Predis\Command\Redis\TimeSeries; -use Predis\Command\Command as RedisCommand; +use Predis\Command\PrefixableCommand as RedisCommand; /** * @see https://redis.io/commands/ts.madd/ @@ -25,4 +25,15 @@ class TSMADD extends RedisCommand { return 'TS.MADD'; } + + public function prefixKeys($prefix) + { + if ($arguments = $this->getArguments()) { + for ($i = 0, $l = count($arguments); $i < $l; $i += 3) { + $arguments[$i] = $prefix . $arguments[$i]; + } + + $this->setArguments($arguments); + } + } } diff --git a/vendor/predis/predis/src/Command/Redis/TimeSeries/TSRANGE.php b/vendor/predis/predis/src/Command/Redis/TimeSeries/TSRANGE.php index 253ba4a..1a6b0bb 100644 --- a/vendor/predis/predis/src/Command/Redis/TimeSeries/TSRANGE.php +++ b/vendor/predis/predis/src/Command/Redis/TimeSeries/TSRANGE.php @@ -12,7 +12,7 @@ namespace Predis\Command\Redis\TimeSeries; -use Predis\Command\Command as RedisCommand; +use Predis\Command\PrefixableCommand as RedisCommand; /** * @see https://redis.io/commands/ts.range/ @@ -36,4 +36,9 @@ class TSRANGE extends RedisCommand $commandArguments )); } + + public function prefixKeys($prefix) + { + $this->applyPrefixForFirstArgument($prefix); + } } diff --git a/vendor/predis/predis/src/Command/Redis/TopK/TOPKADD.php b/vendor/predis/predis/src/Command/Redis/TopK/TOPKADD.php index 990faaf..0beb77b 100644 --- a/vendor/predis/predis/src/Command/Redis/TopK/TOPKADD.php +++ b/vendor/predis/predis/src/Command/Redis/TopK/TOPKADD.php @@ -12,7 +12,7 @@ namespace Predis\Command\Redis\TopK; -use Predis\Command\Command as RedisCommand; +use Predis\Command\PrefixableCommand as RedisCommand; /** * @see https://redis.io/commands/topk.add/ @@ -28,4 +28,9 @@ class TOPKADD extends RedisCommand { return 'TOPK.ADD'; } + + public function prefixKeys($prefix) + { + $this->applyPrefixForFirstArgument($prefix); + } } diff --git a/vendor/predis/predis/src/Command/Redis/TopK/TOPKINCRBY.php b/vendor/predis/predis/src/Command/Redis/TopK/TOPKINCRBY.php index c7fb9a6..2e7146a 100644 --- a/vendor/predis/predis/src/Command/Redis/TopK/TOPKINCRBY.php +++ b/vendor/predis/predis/src/Command/Redis/TopK/TOPKINCRBY.php @@ -12,7 +12,7 @@ namespace Predis\Command\Redis\TopK; -use Predis\Command\Command as RedisCommand; +use Predis\Command\PrefixableCommand as RedisCommand; /** * @see https://redis.io/commands/topk.incrby/ @@ -27,4 +27,9 @@ class TOPKINCRBY extends RedisCommand { return 'TOPK.INCRBY'; } + + public function prefixKeys($prefix) + { + $this->applyPrefixForFirstArgument($prefix); + } } diff --git a/vendor/predis/predis/src/Command/Redis/TopK/TOPKINFO.php b/vendor/predis/predis/src/Command/Redis/TopK/TOPKINFO.php index 50a8ffa..292c806 100644 --- a/vendor/predis/predis/src/Command/Redis/TopK/TOPKINFO.php +++ b/vendor/predis/predis/src/Command/Redis/TopK/TOPKINFO.php @@ -12,7 +12,7 @@ namespace Predis\Command\Redis\TopK; -use Predis\Command\Command as RedisCommand; +use Predis\Command\PrefixableCommand as RedisCommand; /** * @see https://redis.io/commands/topk.info/ @@ -38,4 +38,9 @@ class TOPKINFO extends RedisCommand return $result; } + + public function prefixKeys($prefix) + { + $this->applyPrefixForFirstArgument($prefix); + } } diff --git a/vendor/predis/predis/src/Command/Redis/TopK/TOPKLIST.php b/vendor/predis/predis/src/Command/Redis/TopK/TOPKLIST.php index 6f9e9ac..a085300 100644 --- a/vendor/predis/predis/src/Command/Redis/TopK/TOPKLIST.php +++ b/vendor/predis/predis/src/Command/Redis/TopK/TOPKLIST.php @@ -12,7 +12,7 @@ namespace Predis\Command\Redis\TopK; -use Predis\Command\Command as RedisCommand; +use Predis\Command\PrefixableCommand as RedisCommand; /** * @see https://redis.io/commands/topk.list/ @@ -74,4 +74,9 @@ class TOPKLIST extends RedisCommand return is_string($lastArgument) && strtoupper($lastArgument) === 'WITHCOUNT'; } + + public function prefixKeys($prefix) + { + $this->applyPrefixForFirstArgument($prefix); + } } diff --git a/vendor/predis/predis/src/Command/Redis/TopK/TOPKQUERY.php b/vendor/predis/predis/src/Command/Redis/TopK/TOPKQUERY.php index 5854935..9f6b7e5 100644 --- a/vendor/predis/predis/src/Command/Redis/TopK/TOPKQUERY.php +++ b/vendor/predis/predis/src/Command/Redis/TopK/TOPKQUERY.php @@ -12,7 +12,7 @@ namespace Predis\Command\Redis\TopK; -use Predis\Command\Command as RedisCommand; +use Predis\Command\PrefixableCommand as RedisCommand; /** * @see https://redis.io/commands/topk.query/ @@ -26,4 +26,9 @@ class TOPKQUERY extends RedisCommand { return 'TOPK.QUERY'; } + + public function prefixKeys($prefix) + { + $this->applyPrefixForFirstArgument($prefix); + } } diff --git a/vendor/predis/predis/src/Command/Redis/TopK/TOPKRESERVE.php b/vendor/predis/predis/src/Command/Redis/TopK/TOPKRESERVE.php index 1441548..ffe5768 100644 --- a/vendor/predis/predis/src/Command/Redis/TopK/TOPKRESERVE.php +++ b/vendor/predis/predis/src/Command/Redis/TopK/TOPKRESERVE.php @@ -12,7 +12,7 @@ namespace Predis\Command\Redis\TopK; -use Predis\Command\Command as RedisCommand; +use Predis\Command\PrefixableCommand as RedisCommand; /** * @see https://redis.io/commands/topk.reserve/ @@ -44,4 +44,9 @@ class TOPKRESERVE extends RedisCommand parent::setArguments($arguments); } + + public function prefixKeys($prefix) + { + $this->applyPrefixForFirstArgument($prefix); + } } diff --git a/vendor/predis/predis/src/Command/Redis/Utils/CommandUtility.php b/vendor/predis/predis/src/Command/Redis/Utils/CommandUtility.php new file mode 100644 index 0000000..4425f8e --- /dev/null +++ b/vendor/predis/predis/src/Command/Redis/Utils/CommandUtility.php @@ -0,0 +1,56 @@ + value + * @param bool $recursive + * @return array + */ + public static function arrayToDictionary(array $array, ?callable $callback = null, bool $recursive = true): array + { + if (count($array) % 2 !== 0) { + throw new UnexpectedValueException('Array must have an even number of arguments'); + } + + $dict = []; + + for ($i = 0; $i < count($array); $i += 2) { + if (is_array($array[$i + 1])) { + if ($recursive) { + $dict[$array[$i]] = self::arrayToDictionary($array[$i + 1], $callback, $recursive); + } else { + $dict[$array[$i]] = $array[$i + 1]; + } + } else { + if ($callback) { + [$key, $value] = $callback($array[$i], $array[$i + 1]); + } else { + $key = $array[$i]; + $value = $array[$i + 1]; + } + + $dict[$key] = $value; + } + } + + return $dict; + } +} diff --git a/vendor/predis/predis/src/Command/Redis/Utils/VectorUtility.php b/vendor/predis/predis/src/Command/Redis/Utils/VectorUtility.php new file mode 100644 index 0000000..7a320eb --- /dev/null +++ b/vendor/predis/predis/src/Command/Redis/Utils/VectorUtility.php @@ -0,0 +1,40 @@ +isRaw = true; + $processedArguments[] = 'RAW'; + } + + parent::setArguments($processedArguments); + } + + /** + * @param $data + * @return array|float[]|string|null + */ + public function parseResponse($data) + { + if (!$this->isRaw) { + return array_map(function ($value) { return (float) $value; }, $data); + } + + $parsedData = []; + + for ($i = 0; $i < count($data); $i++) { + if ($i > 1) { + $parsedData[] = (float) $data[$i]; + } else { + $parsedData[] = $data[$i]; + } + } + + return $parsedData; + } +} diff --git a/vendor/predis/predis/src/Command/Redis/VGETATTR.php b/vendor/predis/predis/src/Command/Redis/VGETATTR.php new file mode 100644 index 0000000..f2b4822 --- /dev/null +++ b/vendor/predis/predis/src/Command/Redis/VGETATTR.php @@ -0,0 +1,70 @@ +asJson = $lastArg; + } else { + $arguments[] = $lastArg; + } + + parent::setArguments($arguments); + } + + /** + * @param $data + * @return array|mixed|string|null + */ + public function parseResponse($data) + { + if (!$this->asJson && !is_null($data)) { + return json_decode($data, true); + } + + return $data; + } + + /** + * @param $data + * @return array|mixed|string|null + */ + public function parseResp3Response($data) + { + return $this->parseResponse($data); + } +} diff --git a/vendor/predis/predis/src/Command/Redis/VINFO.php b/vendor/predis/predis/src/Command/Redis/VINFO.php new file mode 100644 index 0000000..6faceb3 --- /dev/null +++ b/vendor/predis/predis/src/Command/Redis/VINFO.php @@ -0,0 +1,40 @@ +withScores = $lastArg; + $arguments[] = 'WITHSCORES'; + } else { + $arguments[] = $lastArg; + } + + parent::setArguments($arguments); + } + + /** + * @param $data + * @return array|null + */ + public function parseResponse($data): ?array + { + if (!is_null($data)) { + if ($this->withScores) { + foreach ($data as $key => $value) { + $data[$key] = CommandUtility::arrayToDictionary($value, function ($key, $value) { + return [$key, (float) $value]; + }); + } + } + } + + return $data; + } +} diff --git a/vendor/predis/predis/src/Command/Redis/VRANDMEMBER.php b/vendor/predis/predis/src/Command/Redis/VRANDMEMBER.php new file mode 100644 index 0000000..77d1187 --- /dev/null +++ b/vendor/predis/predis/src/Command/Redis/VRANDMEMBER.php @@ -0,0 +1,41 @@ +withScores = true; + $processedArguments[] = 'WITHSCORES'; + } + + if (isset($arguments[4])) { + array_push($processedArguments, 'COUNT', $arguments[4]); + } + + if (isset($arguments[5])) { + array_push($processedArguments, 'EF', $arguments[5]); + } + + if (isset($arguments[6])) { + array_push($processedArguments, 'FILTER', $arguments[6]); + } + + if (isset($arguments[7])) { + array_push($processedArguments, 'FILTER-EF', $arguments[7]); + } + + if (isset($arguments[8]) && false !== $arguments[8]) { + $processedArguments[] = 'TRUTH'; + } + + if (isset($arguments[9]) && false !== $arguments[9]) { + $processedArguments[] = 'NOTHREAD'; + } + + parent::setArguments($processedArguments); + } + + /** + * @param $data + * @return array|mixed|string|null + */ + public function parseResponse($data) + { + if ($this->withScores) { + $data = CommandUtility::arrayToDictionary($data, function ($key, $value) { + return [$key, (float) $value]; + }); + } + + return $data; + } +} diff --git a/vendor/predis/predis/src/Command/Redis/XACK.php b/vendor/predis/predis/src/Command/Redis/XACK.php new file mode 100644 index 0000000..545e01f --- /dev/null +++ b/vendor/predis/predis/src/Command/Redis/XACK.php @@ -0,0 +1,34 @@ +applyPrefixForFirstArgument($prefix); + } +} diff --git a/vendor/predis/predis/src/Command/Redis/XCLAIM.php b/vendor/predis/predis/src/Command/Redis/XCLAIM.php new file mode 100644 index 0000000..d31b900 --- /dev/null +++ b/vendor/predis/predis/src/Command/Redis/XCLAIM.php @@ -0,0 +1,89 @@ +parseResponse($data); + } + + public function prefixKeys($prefix) + { + $this->applyPrefixForFirstArgument($prefix); + } +} diff --git a/vendor/predis/predis/src/Command/Redis/XINFO.php b/vendor/predis/predis/src/Command/Redis/XINFO.php index 4d00e67..0749574 100644 --- a/vendor/predis/predis/src/Command/Redis/XINFO.php +++ b/vendor/predis/predis/src/Command/Redis/XINFO.php @@ -14,6 +14,7 @@ namespace Predis\Command\Redis; use Predis\Command\Argument\ArrayableArgument; use Predis\Command\Command as RedisCommand; +use Predis\Command\Redis\Utils\CommandUtility; class XINFO extends RedisCommand { @@ -47,17 +48,61 @@ class XINFO extends RedisCommand } public function parseResponse($data) + { + if ($this->getArgument(0) === 'STREAM') { + return $this->parseStreamResponse($data); + } + + return $this->parseDict($data); + } + + private function parseStreamResponse($data): array + { + $result = CommandUtility::arrayToDictionary($data, null, false); + + if (isset($result['entries'])) { + $result['entries'] = $this->parseDict($result['entries']); + } + + if (isset($result['groups']) && is_array($result['groups'])) { + $result['groups'] = array_map(static function ($group) { + $group = CommandUtility::arrayToDictionary($group, null, false); + if (isset($group['consumers'])) { + $group['consumers'] = array_map(static function ($consumer) { + return CommandUtility::arrayToDictionary($consumer, null, false); + }, $group['consumers']); + } + + return $group; + }, $result['groups']); + } + + return $result; + } + + public function parseResp3Response($data) + { + $result = $data; + if (isset($result['entries'])) { + $result['entries'] = $this->parseDict($result['entries']); + } + + return $result; + } + + private function parseDict($data): array { $result = []; for ($i = 0, $iMax = count($data); $i < $iMax; $i++) { if (is_array($data[$i])) { - $result[$i] = $this->parseResponse($data[$i]); + $result[$i] = $this->parseDict($data[$i]); + continue; } if (array_key_exists($i + 1, $data)) { if (is_array($data[$i + 1])) { - $result[$data[$i]] = $this->parseResponse($data[++$i]); + $result[$data[$i]] = $this->parseDict($data[++$i]); } else { $result[$data[$i]] = $data[++$i]; } diff --git a/vendor/predis/predis/src/Command/Redis/XPENDING.php b/vendor/predis/predis/src/Command/Redis/XPENDING.php new file mode 100644 index 0000000..1dda862 --- /dev/null +++ b/vendor/predis/predis/src/Command/Redis/XPENDING.php @@ -0,0 +1,81 @@ +getArgument(2) !== null) { + return $data; + } + + [$pending, $minId, $maxId, $consumers] = $data; + if (is_array($consumers)) { + $parsedConsumers = []; + foreach ($consumers as [$consumer, $num]) { + $parsedConsumers[$consumer] = (int) $num; + } + } else { + $parsedConsumers = $consumers; + } + + return [$pending, $minId, $maxId, $parsedConsumers]; + } + + public function parseResp3Response($data): array + { + return $this->parseResponse($data); + } + + public function prefixKeys($prefix) + { + $this->applyPrefixForFirstArgument($prefix); + } +} diff --git a/vendor/predis/predis/src/Command/Redis/XREAD.php b/vendor/predis/predis/src/Command/Redis/XREAD.php index 523050b..6b76fc2 100644 --- a/vendor/predis/predis/src/Command/Redis/XREAD.php +++ b/vendor/predis/predis/src/Command/Redis/XREAD.php @@ -46,6 +46,10 @@ class XREAD extends RedisCommand public function parseResponse($data) { + if (!$data) { + return []; + } + $processedData = []; foreach ($data as $stream) { diff --git a/vendor/predis/predis/src/Command/Redis/XSETID.php b/vendor/predis/predis/src/Command/Redis/XSETID.php new file mode 100644 index 0000000..1818582 --- /dev/null +++ b/vendor/predis/predis/src/Command/Redis/XSETID.php @@ -0,0 +1,49 @@ +applyPrefixForFirstArgument($prefix); + } +} diff --git a/vendor/predis/predis/src/Command/Redis/ZPOPMAX.php b/vendor/predis/predis/src/Command/Redis/ZPOPMAX.php index 95b41c6..351debb 100644 --- a/vendor/predis/predis/src/Command/Redis/ZPOPMAX.php +++ b/vendor/predis/predis/src/Command/Redis/ZPOPMAX.php @@ -12,7 +12,7 @@ namespace Predis\Command\Redis; -use Predis\Command\Command as RedisCommand; +use Predis\Command\PrefixableCommand as RedisCommand; /** * @see http://redis.io/commands/zpopmax @@ -63,4 +63,9 @@ class ZPOPMAX extends RedisCommand return $parsedData; } + + public function prefixKeys($prefix) + { + $this->applyPrefixForFirstArgument($prefix); + } } diff --git a/vendor/predis/predis/src/Command/Redis/ZPOPMIN.php b/vendor/predis/predis/src/Command/Redis/ZPOPMIN.php index 80a5047..de43d22 100644 --- a/vendor/predis/predis/src/Command/Redis/ZPOPMIN.php +++ b/vendor/predis/predis/src/Command/Redis/ZPOPMIN.php @@ -12,7 +12,7 @@ namespace Predis\Command\Redis; -use Predis\Command\Command as RedisCommand; +use Predis\Command\PrefixableCommand as RedisCommand; /** * @see http://redis.io/commands/zpopmin @@ -63,4 +63,9 @@ class ZPOPMIN extends RedisCommand return $parsedData; } + + public function prefixKeys($prefix) + { + $this->applyPrefixForFirstArgument($prefix); + } } diff --git a/vendor/predis/predis/src/Connection/Replication/SentinelReplication.php b/vendor/predis/predis/src/Connection/Replication/SentinelReplication.php index 38867e2..1d0310f 100644 --- a/vendor/predis/predis/src/Connection/Replication/SentinelReplication.php +++ b/vendor/predis/predis/src/Connection/Replication/SentinelReplication.php @@ -16,7 +16,6 @@ use InvalidArgumentException; use Predis\Command\Command; use Predis\Command\CommandInterface; use Predis\Command\RawCommand; -use Predis\CommunicationException; use Predis\Connection\AbstractAggregateConnection; use Predis\Connection\ConnectionException; use Predis\Connection\FactoryInterface as ConnectionFactoryInterface; @@ -28,6 +27,7 @@ use Predis\Replication\RoleException; use Predis\Response\Error; use Predis\Response\ErrorInterface as ErrorResponseInterface; use Predis\Response\ServerException; +use Throwable; /** * @author Daniele Alessandri @@ -715,10 +715,16 @@ class SentinelReplication extends AbstractAggregateConnection implements Replica while ($retries <= $this->retryLimit) { try { $response = $this->getConnectionByCommand($command)->$method($command); + if ($response instanceof Error && $response->getErrorType() === 'LOADING') { + throw new ConnectionException($this->current, $response->getMessage()); + } break; - } catch (CommunicationException $exception) { + } catch (Throwable $exception) { $this->wipeServerList(); - $exception->getConnection()->disconnect(); + + if ($exception instanceof ConnectionException) { + $exception->getConnection()->disconnect(); + } if ($retries === $this->retryLimit) { throw $exception; diff --git a/vendor/predis/predis/src/Connection/Resource/Stream.php b/vendor/predis/predis/src/Connection/Resource/Stream.php index 0e20227..271a160 100644 --- a/vendor/predis/predis/src/Connection/Resource/Stream.php +++ b/vendor/predis/predis/src/Connection/Resource/Stream.php @@ -276,6 +276,7 @@ class Stream implements StreamInterface /** * {@inheritDoc} + * @return mixed */ public function getMetadata(?string $key = null) { diff --git a/vendor/predis/predis/src/Connection/Resource/StreamFactory.php b/vendor/predis/predis/src/Connection/Resource/StreamFactory.php index a459e1a..4298cd6 100644 --- a/vendor/predis/predis/src/Connection/Resource/StreamFactory.php +++ b/vendor/predis/predis/src/Connection/Resource/StreamFactory.php @@ -168,7 +168,11 @@ class StreamFactory implements StreamFactoryInterface $options['crypto_type'] = STREAM_CRYPTO_METHOD_TLS_CLIENT; } - if (!stream_context_set_option($resource, ['ssl' => $options])) { + $context_options = function_exists('stream_context_set_options') + ? stream_context_set_options($resource, ['ssl' => $options]) + : stream_context_set_option($resource, ['ssl' => $options]); + + if (!$context_options) { $this->onInitializationError($resource, $parameters, 'Error while setting SSL context options'); } diff --git a/vendor/predis/predis/src/Connection/StreamConnection.php b/vendor/predis/predis/src/Connection/StreamConnection.php index bfcdbdc..667dede 100644 --- a/vendor/predis/predis/src/Connection/StreamConnection.php +++ b/vendor/predis/predis/src/Connection/StreamConnection.php @@ -59,8 +59,6 @@ class StreamConnection extends AbstractConnection public function __construct(ParametersInterface $parameters, ?StreamFactoryInterface $factory = null) { parent::__construct($parameters); - $this->parameters->conn_uid = spl_object_hash($this); - $this->streamFactory = $factory ?? new StreamFactory(); } @@ -145,7 +143,7 @@ class StreamConnection extends AbstractConnection $stream = $this->getResource(); if ($stream->eof()) { - $this->onStreamError(new RuntimeException('Stream is already at the end'), ''); + $this->onStreamError(new RuntimeException('', 1), 'Stream is already at the end'); } try {