Compare commits

...

40 Commits

Author SHA1 Message Date
vladvildanov a5bb1b362e Updated CHANGELOG.md 2026-06-05 14:23:58 +03:00
vladvildanov 79ec4e3a6d Merge branch 'main' of github.com:predis/predis into vv-update-runners 2026-06-05 14:19:12 +03:00
vladvildanov e9b598c540 Update GH runners based on NodeJS <= 20 2026-06-05 14:15:12 +03:00
Till Krüss 8cc4319c06 Prepare 3.5.0 (#1682) 2026-06-02 12:25:56 -07:00
dependabot[bot] 84c77ea460 Bump the github-actions group with 5 updates (#1683) 2026-06-02 10:32:02 -07:00
Till Krüss 3da5d996bd move file 2026-06-02 10:20:38 -07:00
Till Krüss 5d1d9fdf11 Add dependabot configuration for GitHub Actions and Composer 2026-06-02 10:18:37 -07:00
Vladyslav Vildanov 135b405eae Added support for UNLINK command (#1680) 2026-06-02 09:28:57 -07:00
Vladyslav Vildanov 1611b33e4a Updated 8.8 GA test image (#1679) 2026-06-02 09:28:39 -07:00
Vladyslav Vildanov 37ed2dcd77 Updated INCREX arguments (#1677)
* Updated INCREX command arguments

* Updated test image

* Updated CHANGELOG.md

* Updated test image
2026-05-22 12:17:15 +03:00
Vladyslav Vildanov d6f91964e0 Added support for new array commands (#1672)
* Added support for new array commands

* Updated test image, fixed tests

* Updated CHANGELOG.md

* Removed ARLASTITEMS from ClusterStrategy testing

* Fixed broken tests

* Fixed broken test

* Updated 8.8-RC1 image

* Fixed Vector Set tests
2026-05-19 12:19:46 +03:00
Vladyslav Vildanov afc8035491 Revert GCRA command support (#1673)
* Revert GCRA command support

* Updated test image

* Fixed flacky test
2026-05-19 11:36:42 +03:00
Vladyslav Vildanov b2d1397fc6 Fixed SENTINEL SLAVES RESP3 incompatible response (#1676)
* Fixed SENTINEL SLAVES RESP3 incompatible response

* Updated CHANGELOG.md

* Revert relay-incompatible annotations
2026-05-14 09:56:32 +03:00
Vladyslav Vildanov f12e6694b5 Added support for INCREX command (#1674)
* Added support for INCREX command

* Fixed RESP2 and RESP3 incompatibility

* Removed non-printable characters

* Codestyle fixes
2026-05-13 11:11:07 +03:00
Vladyslav Vildanov 268449ae69 Added testing for subkey notification channels (#1671)
* Added testing for subkey notification channels

* Updated CHANGELOG.md

* Codestyle fixes

* Added test cleanup

* Added relay-incompatible label
2026-04-29 22:29:28 +03:00
Vladyslav Vildanov 52286f8164 Added support for multiple aggregators for TS range commands (#1670)
* Added support for multiple aggregators for TS range commands

* Updated CHANGELOG.md
2026-04-23 10:26:00 +03:00
Vladyslav Vildanov 6c3909e675 Added new COUNT aggregator for Sorted Set commands (#1668)
* Added test coverage with new COUNT aggregator

* Updated CHANGELOG.md

* Changed version constraint

* Fixed broken test

* Marked as relay-resp3
2026-04-22 10:47:00 +03:00
Vladyslav Vildanov 622f4df2b6 Added XNACK support (#1666)
* Renamed GCRA parameters to match latest API

* Added support for XNACK command

* Updated test image

* Updated test image

* Updated version requirements

* Fixed broken test

* Updated CHANGELOG.md

* Updated CHANGELOG.md
2026-04-22 10:30:57 +03:00
Vladyslav Vildanov ae4a706b01 Fixed Sentinel retry to narrow retryable exceptions to CommunicationException (#1665)
* Fixed Sentinel retry to narrow retryable exceptions to CommunicationException

* Update CHANGELOG.md
2026-04-20 10:10:15 +03:00
Vladyslav Vildanov 54bb300931 Updated arguments name for GCRA command (#1667)
* Renamed GCRA parameters to match latest API

* Updated test image

* Updated version requirements

* Fixed broken test

* Updated CHANGELOG.md
2026-04-20 10:09:34 +03:00
Vladyslav Vildanov 5024c7a662 Fixed ZRANGE to include 6.2 arguments (#1662)
* Fixed ZRANGE to include 6.2 arguments

* Removed duplicated arguments entry
2026-04-06 10:59:15 +03:00
Vladyslav Vildanov 3fc01fed58 Added FPHA argument for JSON.SET command (#1661) 2026-04-03 18:50:19 +09:00
messikiller 4c56d5d290 Fix SlotMap::offsetUnset() corrupting mappings when unsetting a slot in a gap (#1660) 2026-03-25 18:36:01 +09:00
Vladyslav Vildanov 7a4fa99d13 Added support for GCRA command (#1657)
* Added support for GCRA command

* Codestyle fixes

* Updated test image
2026-03-24 13:50:23 +02:00
Kevin Rojas bb37322a24 Handle -READONLY as a redirection signal for Redis Cluster (AWS ElastiCache support) (#1656)
* feature: Added support for READONLY responses from AWS Elastic Cache

* chore: improve -READONLY handler comment and add changelog entry (#1656)

* tests: add unit test demonstrating ServerException behavior with READONLY error
2026-03-23 09:00:26 +02:00
Copilot 1c4219cf88 Include command name in unsupported container command error messages (#1654)
Co-authored-by: tillkruss <665029+tillkruss@users.noreply.github.com>
2026-03-18 10:09:30 +09:00
Till Krüss 383623eb05 bump dev version 2026-03-09 13:34:39 -07:00
Till Krüss 2033429520 tag v3.4.2 2026-03-09 13:33:04 -07:00
Till Krüss 87390e7381 Use static closures (#1652) 2026-03-09 13:30:46 -07:00
Till Krüss f57dfcbeea Format changelog entry [skip ci] 2026-03-09 13:04:50 -07:00
Vasil Chomakov 7388d91153 Add upstream_driver option for CLIENT SETINFO upstream reporting (#1645)
* Add driver_info option for CLIENT SETINFO upstream reporting

* Use null default for upstreamDriver and ternary operator

* Remove redundant null initialization

* fix: remove trailing newline from VERSION file

* fix: update copyright year to 2026 in DriverInfo files

* refactor: rename driver_info to upstream_driver

* fix: code style issues

* docs: update CHANGELOG to reflect upstream_driver rename
2026-03-05 17:05:02 +02:00
Wolfgang Kerschbaumer d0f6671a60 Fix sentinel discovery methods not catching StreamInitException (#1650)
* Fix sentinel discovery methods not catching StreamInitException

The getMaster(), getSlaves(), and updateSentinels() methods only catch
ConnectionException when connecting to Sentinel nodes. StreamInitException
(thrown by stream_socket_client() failures) extends PredisException directly,
not ConnectionException, so it propagates uncaught — preventing fallback to
the next Sentinel node.

This causes complete application failure when any single Sentinel is
unreachable, even if other Sentinels are healthy.

Add StreamInitException to the catch clause using a union type in all three
methods. This is more precise than catching PredisException, which would
also swallow ServerException (e.g. "ERR No such master with that name")
and mask configuration errors.

See also #1577 which applied a similar fix to retryCommandOnFailure().

* Fix coding standards and add changelog entry

- Remove spaces around | in union catch (php-cs-fixer)
- Add CHANGELOG.md entry for #1650

* Codestlye fixes

---------

Co-authored-by: Wolfgang Kerschbaumer <wolfgang.kerschbaumer@bergfex.at>
Co-authored-by: vladvildanov <vladyslav.vildanov@redis.com>
2026-03-05 17:01:40 +02:00
Vladyslav Vildanov 274cb866bd Fixed Sentinel getParameters() executed on string configuration (#1649) 2026-02-26 11:01:54 -08:00
Till Krüss 0850f2f36e Prepare v3.4.1 release (#1647) 2026-02-23 11:51:21 -08:00
Till Krüss 581c5659bd update year in headers 2026-02-23 11:48:06 -08:00
predakanga 4a5be21d62 Make LMPOP and BLMPOP commands prefixable (#1646)
* Make LMPOP and BLMPOP commands prefixable

* Update CHANGELOG
2026-02-23 10:31:19 +02:00
Thomas Stägemann 7fd23dbcb9 Removed static from callables because it's deprecated since PHP 8.2 (#1642) 2026-02-20 11:05:12 +02:00
Amir Hossein Shokri dd0713b515 Fix typo (#1640) 2026-02-17 09:12:43 -08:00
Vladyslav Vildanov 4b527ba961 Make HTTL and HPTTL commands Prefixable (#1639) 2026-02-17 09:12:12 -08:00
Vladyslav Vildanov 6c9de258be Fixed getParameter() call on array + added integration testing with Sentinel (#1636)
* Fixed getParameter() call on array + added integration testing with Sentinel

* Added sentinel.conf

* Updated CHANGELOG.md

* Added handling of ParametersInterface
2026-02-13 11:30:43 +02:00
1270 changed files with 8515 additions and 1690 deletions
+20
View File
@@ -0,0 +1,20 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: /
schedule:
interval: "monthly"
groups:
github-actions:
patterns:
- "*"
- package-ecosystem: "composer"
directory: /
schedule:
interval: "monthly"
groups:
composer-minor:
update-types:
- "minor"
- "patch"
+22
View File
@@ -57,6 +57,7 @@ services:
- all
- clients
- unprotected
- sentinel
redis-cluster:
image: ${REDIS_IMAGE_NAME:-redislabs/client-libs-test:8.0.2}
@@ -97,3 +98,24 @@ services:
- all
- clients
- stack
sentinel:
image: ${REDIS_IMAGE_NAME:-redislabs/client-libs-test:8.0.2}
container_name: redis-sentinel
depends_on:
- redis-unprotected
environment:
- REDIS_CLUSTER=no
- NODES=3
- PORT=26379
command: ${REDIS_EXTRA_ARGS:---sentinel}
ports:
- 26379:26379
- 26380:26380
- 26381:26381
volumes:
- "./dockers/sentinel.conf:/redis/config-default/redis.conf"
- "./dockers/sentinel:/redis/work"
profiles:
- sentinel
- all
+8
View File
@@ -0,0 +1,8 @@
sentinel resolve-hostnames yes
sentinel monitor predis-test 127.0.0.1 6380 2
# Be much more tolerant to transient stalls (index builds, GC, I/O)
sentinel down-after-milliseconds predis-test 60000
# Avoid rapid repeated failover attempts
sentinel failover-timeout predis-test 180000
# Keep it conservative: sync one replica at a time
sentinel parallel-syncs predis-test 1
+8 -8
View File
@@ -24,7 +24,7 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v6
- name: Check file permissions
run: test "$(find . -type f -not -path './.git/*' -executable)" = "./bin/create-command-test"
@@ -47,7 +47,7 @@ jobs:
tools: parallel-lint
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v6
- name: Check source code for syntax errors
run: composer exec -- parallel-lint bin/ examples/ src/ tests/
@@ -67,13 +67,13 @@ jobs:
coverage: none
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v6
- name: Validate Composer configuration
run: composer validate --no-interaction --strict
- name: Install dependencies
uses: ramsey/composer-install@v2
uses: ramsey/composer-install@v4
with:
dependency-versions: highest
@@ -101,7 +101,7 @@ jobs:
coverage: none
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v6
- name: Check EditorConfig configuration
run: test -f .editorconfig
@@ -110,7 +110,7 @@ jobs:
uses: greut/eclint-action@v0
- name: Install dependencies
uses: ramsey/composer-install@v2
uses: ramsey/composer-install@v4
with:
dependency-versions: highest
@@ -130,7 +130,7 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v6
- name: Check exported files
run: |
@@ -159,7 +159,7 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
fetch-depth: 0
+1 -1
View File
@@ -27,7 +27,7 @@ jobs:
steps:
- uses: release-drafter/release-drafter@v5
- uses: release-drafter/release-drafter@v7
with:
config-name: release-drafter-config.yml
env:
+2 -2
View File
@@ -6,9 +6,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v6
- name: Check Spelling
uses: rojopolis/spellcheck-github-actions@0.33.1
uses: rojopolis/spellcheck-github-actions@0.60.0
with:
config_path: .github/spellcheck-settings.yml
task_name: Markdown
+25 -7
View File
@@ -34,6 +34,7 @@ jobs:
- '8.2'
- '8.4'
- '8.6'
- '8.8'
steps:
@@ -41,7 +42,8 @@ jobs:
run: |
# Mapping of original redis versions to client test containers
declare -A redis_clients_version_mapping=(
["8.6"]="8.6.0"
["8.8"]="8.8.0"
["8.6"]="8.6.1"
["8.4"]="8.4.0"
["8.2"]="8.2.2"
["8.0"]="8.0.2"
@@ -76,16 +78,16 @@ jobs:
fi
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v6
- name: Start Redis standalone image
uses: hoverkraft-tech/compose-action@v2.0.1
uses: hoverkraft-tech/compose-action@v3.0.0
with:
compose-file: .github/docker-compose.yml
services: ${{ env.DOCKER_SERVICE }}
- name: Start Redis unprotected image
uses: hoverkraft-tech/compose-action@v2.0.1
uses: hoverkraft-tech/compose-action@v3.0.0
if: ${{ matrix.redis > '4.0' }}
with:
compose-file: .github/docker-compose.yml
@@ -93,7 +95,7 @@ jobs:
- name: Start Redis stack image
id: stack_infra
uses: hoverkraft-tech/compose-action@v2.0.1
uses: hoverkraft-tech/compose-action@v3.0.0
if: ${{ matrix.redis >= '7.2' && matrix.redis < '8.0' }}
with:
compose-file: .github/docker-compose.yml
@@ -101,12 +103,20 @@ jobs:
- name: Start Redis cluster image
id: cluster_infra
uses: hoverkraft-tech/compose-action@v2.0.1
uses: hoverkraft-tech/compose-action@v3.0.0
if: ${{ matrix.redis > '4.0' }}
with:
compose-file: .github/docker-compose.yml
services: redis-cluster
- name: Start Redis sentinels image
id: sentinel_infra
uses: hoverkraft-tech/compose-action@v3.0.0
if: ${{ matrix.redis > '4.0' }}
with:
compose-file: .github/docker-compose.yml
services: sentinel
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
@@ -115,7 +125,7 @@ jobs:
coverage: ${{ (matrix.php == '8.4' && matrix.redis == '8.0') && 'xdebug' || 'none' }}
- name: Install Composer dependencies
uses: ramsey/composer-install@v2
uses: ramsey/composer-install@v4
with:
dependency-versions: highest
composer-options: ${{ matrix.php == '8.0' && '--ignore-platform-reqs' || '' }}
@@ -144,6 +154,14 @@ jobs:
if: ${{ matrix.php == '8.4' && matrix.redis == '8.0' }}
run: vendor/bin/phpunit --group unprotected --coverage-php build/cov/coverage-unprotected.cov --coverage-filter ./src
- name: Run sentinel tests
if: ${{ (matrix.php != '8.4' || matrix.redis != '8.0') && matrix.redis > '4.0'}}
run: vendor/bin/phpunit --group sentinel
- name: Run sentinel tests with coverage
if: ${{ matrix.php == '8.4' && matrix.redis == '8.0' }}
run: vendor/bin/phpunit --group sentinel --coverage-php build/cov/coverage-sentinel.cov --coverage-filter ./src
- name: Run stack tests
if: ${{ (matrix.php != '8.4' || matrix.redis != '8.0') && matrix.redis >= '7.2' }}
run: vendor/bin/phpunit --group realm-stack
+1 -1
View File
@@ -4,7 +4,7 @@ $PREDIS_HEADER = <<<EOS
This file is part of the Predis package.
(c) 2009-2020 Daniele Alessandri
(c) 2021-2025 Till Krüss
(c) 2021-2026 Till Krüss
For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.
+42
View File
@@ -1,4 +1,46 @@
## Changelog
### Unreleased
### Changed
- Update GH runners based on NodeJS <= 20 (#1684)
## v3.5.0 (2026-06-02)
### Added
- Added support for `XNACK` command (#1666)
- Added support for `INCREX` command (#1674)
- Added support for `UNLINK` command (#1680)
- Added support for `AR*` array commands (#1672)
- Handle Redis Cluster `-READONLY` responses failover events (#1656)
- Added `FPHA` argument for `JSON.SET` command (#1661)
- Added new `COUNT` aggregator for Sorted Set commands (#1668)
- Added support for multiple aggregators for `TS.range` commands (#1670)
### Changed
- Include command name in unsupported container command error messages (#1653)
### Fixed
- Fixed handling of gap slots in `SlotMap::offsetUnset()` (#1660)
- Fixed `ZRANGE` to include 6.2 arguments (#1662)
- Fixed Sentinel retry to narrow retryable exceptions to `CommunicationException` (#1665)
- Fixed `SENTINEL SLAVES` RESP3 incompatible response (#1676)
## v3.4.2 (2026-03-09)
### Changed
- Switch to `static` closures
### Fixed
- Fixed Sentinel `getParameters()` executed on string configuration (#1649)
- Fixed Sentinel discovery methods not catching `StreamInitException` on connection failure (#1650)
## v3.4.1 (2026-02-23)
### Added
- Added `upstream_driver` option for CLIENT SETINFO upstream reporting (#1645)
- Made `H(P)TTL` commands prefixable (#1639)
- Made `(B)LMPOP` commands prefixable (#1643)
### Fixed
- Fixed Sentinel `getParameter()` call on array error (#2423)
- Removed deprecated `static` from callables (#1642)
## v3.4.0 (2026-02-11)
### Added
+1 -1
View File
@@ -664,7 +664,7 @@ $client = new Predis\Client(['read_write_timeout' => 0, 'protocol' => 3]);
// Create push notifications consumer.
// Provides callback where current consumer subscribes to few channels before
// enter the loop.
$push = $client->push(static function (ClientInterface $client) {
$push = $client->push(function (ClientInterface $client) {
$response = $client->subscribe('channel', 'control');
$status = ($response[2] === 1) ? 'OK' : 'FAILED';
echo "Channel subscription status: {$status}\n";
+1 -1
View File
@@ -1 +1 @@
3.4.0
3.5.0
+1 -1
View File
@@ -4,7 +4,7 @@
* This file is part of the Predis package.
*
* (c) 2009-2020 Daniele Alessandri
* (c) 2021-2025 Till Krüss
* (c) 2021-2026 Till Krüss
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
+1 -1
View File
@@ -4,7 +4,7 @@
* This file is part of the Predis package.
*
* (c) 2009-2020 Daniele Alessandri
* (c) 2021-2025 Till Krüss
* (c) 2021-2026 Till Krüss
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
+1 -1
View File
@@ -4,7 +4,7 @@
* This file is part of the Predis package.
*
* (c) 2009-2020 Daniele Alessandri
* (c) 2021-2025 Till Krüss
* (c) 2021-2026 Till Krüss
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
+1 -1
View File
@@ -4,7 +4,7 @@
* This file is part of the Predis package.
*
* (c) 2009-2020 Daniele Alessandri
* (c) 2021-2025 Till Krüss
* (c) 2021-2026 Till Krüss
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
@@ -4,7 +4,7 @@
* This file is part of the Predis package.
*
* (c) 2009-2020 Daniele Alessandri
* (c) 2021-2025 Till Krüss
* (c) 2021-2026 Till Krüss
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
+1 -1
View File
@@ -4,7 +4,7 @@
* This file is part of the Predis package.
*
* (c) 2009-2020 Daniele Alessandri
* (c) 2021-2025 Till Krüss
* (c) 2021-2026 Till Krüss
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
+1 -1
View File
@@ -4,7 +4,7 @@
* This file is part of the Predis package.
*
* (c) 2009-2020 Daniele Alessandri
* (c) 2021-2025 Till Krüss
* (c) 2021-2026 Till Krüss
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
+1 -1
View File
@@ -4,7 +4,7 @@
* This file is part of the Predis package.
*
* (c) 2009-2020 Daniele Alessandri
* (c) 2021-2025 Till Krüss
* (c) 2021-2026 Till Krüss
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
+1 -1
View File
@@ -4,7 +4,7 @@
* This file is part of the Predis package.
*
* (c) 2009-2020 Daniele Alessandri
* (c) 2021-2025 Till Krüss
* (c) 2021-2026 Till Krüss
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
+1 -1
View File
@@ -4,7 +4,7 @@
* This file is part of the Predis package.
*
* (c) 2009-2020 Daniele Alessandri
* (c) 2021-2025 Till Krüss
* (c) 2021-2026 Till Krüss
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
@@ -4,7 +4,7 @@
* This file is part of the Predis package.
*
* (c) 2009-2020 Daniele Alessandri
* (c) 2021-2025 Till Krüss
* (c) 2021-2026 Till Krüss
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
+1 -1
View File
@@ -4,7 +4,7 @@
* This file is part of the Predis package.
*
* (c) 2009-2020 Daniele Alessandri
* (c) 2021-2025 Till Krüss
* (c) 2021-2026 Till Krüss
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
+1 -1
View File
@@ -4,7 +4,7 @@
* This file is part of the Predis package.
*
* (c) 2009-2020 Daniele Alessandri
* (c) 2021-2025 Till Krüss
* (c) 2021-2026 Till Krüss
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
+1 -1
View File
@@ -4,7 +4,7 @@
* This file is part of the Predis package.
*
* (c) 2009-2020 Daniele Alessandri
* (c) 2021-2025 Till Krüss
* (c) 2021-2026 Till Krüss
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
+1 -1
View File
@@ -4,7 +4,7 @@
* This file is part of the Predis package.
*
* (c) 2009-2020 Daniele Alessandri
* (c) 2021-2025 Till Krüss
* (c) 2021-2026 Till Krüss
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
+1 -1
View File
@@ -4,7 +4,7 @@
* This file is part of the Predis package.
*
* (c) 2009-2020 Daniele Alessandri
* (c) 2021-2025 Till Krüss
* (c) 2021-2026 Till Krüss
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
+1 -1
View File
@@ -4,7 +4,7 @@
* This file is part of the Predis package.
*
* (c) 2009-2020 Daniele Alessandri
* (c) 2021-2025 Till Krüss
* (c) 2021-2026 Till Krüss
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
@@ -4,7 +4,7 @@
* This file is part of the Predis package.
*
* (c) 2009-2020 Daniele Alessandri
* (c) 2021-2025 Till Krüss
* (c) 2021-2026 Till Krüss
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
+1 -1
View File
@@ -4,7 +4,7 @@
* This file is part of the Predis package.
*
* (c) 2009-2020 Daniele Alessandri
* (c) 2021-2025 Till Krüss
* (c) 2021-2026 Till Krüss
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
+1 -1
View File
@@ -4,7 +4,7 @@
* This file is part of the Predis package.
*
* (c) 2009-2020 Daniele Alessandri
* (c) 2021-2025 Till Krüss
* (c) 2021-2026 Till Krüss
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
@@ -4,7 +4,7 @@
* This file is part of the Predis package.
*
* (c) 2009-2020 Daniele Alessandri
* (c) 2021-2025 Till Krüss
* (c) 2021-2026 Till Krüss
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
+1 -1
View File
@@ -4,7 +4,7 @@
* This file is part of the Predis package.
*
* (c) 2009-2020 Daniele Alessandri
* (c) 2021-2025 Till Krüss
* (c) 2021-2026 Till Krüss
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
+1 -1
View File
@@ -4,7 +4,7 @@
* This file is part of the Predis package.
*
* (c) 2009-2020 Daniele Alessandri
* (c) 2021-2025 Till Krüss
* (c) 2021-2026 Till Krüss
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
+1 -1
View File
@@ -4,7 +4,7 @@
* This file is part of the Predis package.
*
* (c) 2009-2020 Daniele Alessandri
* (c) 2021-2025 Till Krüss
* (c) 2021-2026 Till Krüss
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
+1 -1
View File
@@ -4,7 +4,7 @@
* This file is part of the Predis package.
*
* (c) 2009-2020 Daniele Alessandri
* (c) 2021-2025 Till Krüss
* (c) 2021-2026 Till Krüss
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
+1 -1
View File
@@ -4,7 +4,7 @@
* This file is part of the Predis package.
*
* (c) 2009-2020 Daniele Alessandri
* (c) 2021-2025 Till Krüss
* (c) 2021-2026 Till Krüss
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
+1 -1
View File
@@ -4,7 +4,7 @@
* This file is part of the Predis package.
*
* (c) 2009-2020 Daniele Alessandri
* (c) 2021-2025 Till Krüss
* (c) 2021-2026 Till Krüss
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
@@ -4,7 +4,7 @@
* This file is part of the Predis package.
*
* (c) 2009-2020 Daniele Alessandri
* (c) 2021-2025 Till Krüss
* (c) 2021-2026 Till Krüss
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
@@ -4,7 +4,7 @@
* This file is part of the Predis package.
*
* (c) 2009-2020 Daniele Alessandri
* (c) 2021-2025 Till Krüss
* (c) 2021-2026 Till Krüss
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
+1 -1
View File
@@ -4,7 +4,7 @@
* This file is part of the Predis package.
*
* (c) 2009-2020 Daniele Alessandri
* (c) 2021-2025 Till Krüss
* (c) 2021-2026 Till Krüss
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
+1 -1
View File
@@ -4,7 +4,7 @@
* This file is part of the Predis package.
*
* (c) 2009-2020 Daniele Alessandri
* (c) 2021-2025 Till Krüss
* (c) 2021-2026 Till Krüss
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
+1 -1
View File
@@ -4,7 +4,7 @@
* This file is part of the Predis package.
*
* (c) 2009-2020 Daniele Alessandri
* (c) 2021-2025 Till Krüss
* (c) 2021-2026 Till Krüss
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
+1 -1
View File
@@ -4,7 +4,7 @@
* This file is part of the Predis package.
*
* (c) 2009-2020 Daniele Alessandri
* (c) 2021-2025 Till Krüss
* (c) 2021-2026 Till Krüss
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
+1 -1
View File
@@ -4,7 +4,7 @@
* This file is part of the Predis package.
*
* (c) 2009-2020 Daniele Alessandri
* (c) 2021-2025 Till Krüss
* (c) 2021-2026 Till Krüss
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
+1 -1
View File
@@ -4,7 +4,7 @@
* This file is part of the Predis package.
*
* (c) 2009-2020 Daniele Alessandri
* (c) 2021-2025 Till Krüss
* (c) 2021-2026 Till Krüss
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
+1 -1
View File
@@ -4,7 +4,7 @@
* This file is part of the Predis package.
*
* (c) 2009-2020 Daniele Alessandri
* (c) 2021-2025 Till Krüss
* (c) 2021-2026 Till Krüss
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
+3 -3
View File
@@ -4,7 +4,7 @@
* This file is part of the Predis package.
*
* (c) 2009-2020 Daniele Alessandri
* (c) 2021-2025 Till Krüss
* (c) 2021-2026 Till Krüss
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
@@ -40,7 +40,7 @@ class NaiveDistributor implements DistributorInterface, HashGeneratorInterface
public function remove($node)
{
$this->nodes = array_filter($this->nodes, function ($n) use ($node) {
$this->nodes = array_filter($this->nodes, static function ($n) use ($node) {
return $n !== $node;
});
@@ -89,7 +89,7 @@ class NaiveDistributor implements DistributorInterface, HashGeneratorInterface
}
$options = [
'cluster' => function () {
'cluster' => static function () {
$distributor = new NaiveDistributor();
$strategy = new PredisStrategy($distributor);
$cluster = new PredisCluster($strategy);
+1 -1
View File
@@ -4,7 +4,7 @@
* This file is part of the Predis package.
*
* (c) 2009-2020 Daniele Alessandri
* (c) 2021-2025 Till Krüss
* (c) 2021-2026 Till Krüss
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
+2 -2
View File
@@ -4,7 +4,7 @@
* This file is part of the Predis package.
*
* (c) 2009-2020 Daniele Alessandri
* (c) 2021-2025 Till Krüss
* (c) 2021-2026 Till Krüss
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
@@ -62,7 +62,7 @@ class EventsListener implements Countable
$dispatcher->attachCallback('events', $events = new EventsListener());
// Attach a function to control the dispatcher loop termination with a message.
$dispatcher->attachCallback('control', function ($payload, $dispatcher) {
$dispatcher->attachCallback('control', static function ($payload, $dispatcher) {
if ($payload === 'terminate_dispatcher') {
$dispatcher->stop();
}
+1 -1
View File
@@ -4,7 +4,7 @@
* This file is part of the Predis package.
*
* (c) 2009-2020 Daniele Alessandri
* (c) 2021-2025 Till Krüss
* (c) 2021-2026 Till Krüss
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
+1 -1
View File
@@ -4,7 +4,7 @@
* This file is part of the Predis package.
*
* (c) 2009-2020 Daniele Alessandri
* (c) 2021-2025 Till Krüss
* (c) 2021-2026 Till Krüss
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
+1 -1
View File
@@ -4,7 +4,7 @@
* This file is part of the Predis package.
*
* (c) 2009-2020 Daniele Alessandri
* (c) 2021-2025 Till Krüss
* (c) 2021-2026 Till Krüss
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
+1 -1
View File
@@ -4,7 +4,7 @@
* This file is part of the Predis package.
*
* (c) 2009-2020 Daniele Alessandri
* (c) 2021-2025 Till Krüss
* (c) 2021-2026 Till Krüss
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
+2 -2
View File
@@ -4,7 +4,7 @@
* This file is part of the Predis package.
*
* (c) 2009-2020 Daniele Alessandri
* (c) 2021-2025 Till Krüss
* (c) 2021-2026 Till Krüss
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
@@ -18,7 +18,7 @@ require __DIR__ . '/shared.php';
$client = new Predis\Client($single_server);
$responses = $client->pipeline(function ($pipe) {
$responses = $client->pipeline(static function ($pipe) {
$pipe->flushdb();
$pipe->incrby('counter', 10);
$pipe->incrby('counter', 30);
+1 -1
View File
@@ -4,7 +4,7 @@
* This file is part of the Predis package.
*
* (c) 2009-2020 Daniele Alessandri
* (c) 2021-2025 Till Krüss
* (c) 2021-2026 Till Krüss
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
+1 -1
View File
@@ -4,7 +4,7 @@
* This file is part of the Predis package.
*
* (c) 2009-2020 Daniele Alessandri
* (c) 2021-2025 Till Krüss
* (c) 2021-2026 Till Krüss
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
+1 -1
View File
@@ -4,7 +4,7 @@
* This file is part of the Predis package.
*
* (c) 2009-2020 Daniele Alessandri
* (c) 2021-2025 Till Krüss
* (c) 2021-2026 Till Krüss
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
+1 -1
View File
@@ -4,7 +4,7 @@
* This file is part of the Predis package.
*
* (c) 2009-2020 Daniele Alessandri
* (c) 2021-2025 Till Krüss
* (c) 2021-2026 Till Krüss
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
+1 -1
View File
@@ -4,7 +4,7 @@
* This file is part of the Predis package.
*
* (c) 2009-2020 Daniele Alessandri
* (c) 2021-2025 Till Krüss
* (c) 2021-2026 Till Krüss
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
+1 -1
View File
@@ -4,7 +4,7 @@
* This file is part of the Predis package.
*
* (c) 2009-2020 Daniele Alessandri
* (c) 2021-2025 Till Krüss
* (c) 2021-2026 Till Krüss
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
+1 -1
View File
@@ -4,7 +4,7 @@
* This file is part of the Predis package.
*
* (c) 2009-2020 Daniele Alessandri
* (c) 2021-2025 Till Krüss
* (c) 2021-2026 Till Krüss
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
+2 -2
View File
@@ -4,7 +4,7 @@
* This file is part of the Predis package.
*
* (c) 2009-2020 Daniele Alessandri
* (c) 2021-2025 Till Krüss
* (c) 2021-2026 Till Krüss
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
@@ -23,7 +23,7 @@ $pubsub = $client->pubSubLoop();
// When using Relay you cannot use foreach-loops to iterate
// over messages instead use a callback function
$poorMansKafka = function ($message, $client) {
$poorMansKafka = static function ($message, $client) {
switch ($message->kind) {
case 'subscribe':
echo "Subscribed to {$message->channel}", PHP_EOL;
+2 -2
View File
@@ -4,7 +4,7 @@
* This file is part of the Predis package.
*
* (c) 2009-2020 Daniele Alessandri
* (c) 2021-2025 Till Krüss
* (c) 2021-2026 Till Krüss
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
@@ -56,7 +56,7 @@ $options = [
'commands' => [
'hmgetall' => 'HashMultipleGetAll',
],
'replication' => function () {
'replication' => static function () {
$strategy = new ReplicationStrategy();
$strategy->setScriptReadOnly(HashMultipleGetAll::BODY);
+1 -1
View File
@@ -4,7 +4,7 @@
* This file is part of the Predis package.
*
* (c) 2009-2020 Daniele Alessandri
* (c) 2021-2025 Till Krüss
* (c) 2021-2026 Till Krüss
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
+1 -1
View File
@@ -4,7 +4,7 @@
* This file is part of the Predis package.
*
* (c) 2009-2020 Daniele Alessandri
* (c) 2021-2025 Till Krüss
* (c) 2021-2026 Till Krüss
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
+1 -1
View File
@@ -4,7 +4,7 @@
* This file is part of the Predis package.
*
* (c) 2009-2020 Daniele Alessandri
* (c) 2021-2025 Till Krüss
* (c) 2021-2026 Till Krüss
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
+2 -2
View File
@@ -4,7 +4,7 @@
* This file is part of the Predis package.
*
* (c) 2009-2020 Daniele Alessandri
* (c) 2021-2025 Till Krüss
* (c) 2021-2026 Till Krüss
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
@@ -74,7 +74,7 @@ class EventsListener implements Countable
$dispatcher->attachCallback('{channels}_events', $events = new EventsListener());
// 6. Attach a function to control the dispatcher loop termination with a message.
$dispatcher->attachCallback('control', function ($payload, $dispatcher) {
$dispatcher->attachCallback('control', static function ($payload, $dispatcher) {
if ($payload === 'terminate_dispatcher') {
$dispatcher->stop();
}
+1 -1
View File
@@ -4,7 +4,7 @@
* This file is part of the Predis package.
*
* (c) 2009-2020 Daniele Alessandri
* (c) 2021-2025 Till Krüss
* (c) 2021-2026 Till Krüss
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
+1 -1
View File
@@ -4,7 +4,7 @@
* This file is part of the Predis package.
*
* (c) 2009-2020 Daniele Alessandri
* (c) 2021-2025 Till Krüss
* (c) 2021-2026 Till Krüss
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
+2 -2
View File
@@ -4,7 +4,7 @@
* This file is part of the Predis package.
*
* (c) 2009-2020 Daniele Alessandri
* (c) 2021-2025 Till Krüss
* (c) 2021-2026 Till Krüss
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
@@ -35,7 +35,7 @@ function zpop($client, $key)
// which the client bails out with an exception.
];
$client->transaction($options, function ($tx) use ($key, &$element) {
$client->transaction($options, static function ($tx) use ($key, &$element) {
@[$element] = $tx->zrange($key, 0, 0);
if (isset($element)) {
+8
View File
@@ -33,6 +33,7 @@
<group>gears</group>
<group>gears-cluster</group>
<group>unprotected</group>
<group>sentinel</group>
<!-- <group>connected</group> -->
<!-- <group>disconnected</group> -->
<!-- <group>commands</group> -->
@@ -55,6 +56,13 @@
<env name="USE_RELAY" value="false" />
<env name="REDIS_STACK_SERVER_PORT" value="6479" />
<!-- Sentinel -->
<const name="REDIS_SENTINEL_SERVICE" value="predis-test" />
<const
name="REDIS_SENTINEL_ENDPOINTS"
value="127.0.0.1:26379,127.0.0.1:26380,127.0.0.1:26381"
/>
<!-- SSL -->
<env name="STANDALONE_CA_CERT_PATH" value=".github/dockers/standalone/tls/ca.crt" />
<env name="STANDALONE_LOCAL_CERT_PATH" value=".github/dockers/standalone/tls/test_user.crt" />
+1 -1
View File
@@ -4,7 +4,7 @@
* This file is part of the Predis package.
*
* (c) 2009-2020 Daniele Alessandri
* (c) 2021-2025 Till Krüss
* (c) 2021-2026 Till Krüss
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
+2 -2
View File
@@ -4,7 +4,7 @@
* This file is part of the Predis package.
*
* (c) 2009-2020 Daniele Alessandri
* (c) 2021-2025 Till Krüss
* (c) 2021-2026 Till Krüss
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
@@ -56,7 +56,7 @@ use Traversable;
*/
class Client implements ClientInterface, IteratorAggregate
{
public const VERSION = '3.4.0';
public const VERSION = '3.5.0';
/** @var OptionsInterface */
private $options;
+1 -1
View File
@@ -4,7 +4,7 @@
* This file is part of the Predis package.
*
* (c) 2009-2020 Daniele Alessandri
* (c) 2021-2025 Till Krüss
* (c) 2021-2026 Till Krüss
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
+24 -2
View File
@@ -4,7 +4,7 @@
* This file is part of the Predis package.
*
* (c) 2009-2020 Daniele Alessandri
* (c) 2021-2025 Till Krüss
* (c) 2021-2026 Till Krüss
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
@@ -47,6 +47,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\HSETEX;
use Predis\Command\Redis\VADD;
/**
@@ -76,7 +77,26 @@ use Predis\Command\Redis\VADD;
* @method $this sort_ro(string $key, ?string $byPattern = null, ?LimitOffsetCount $limit = null, array $getPatterns = [], ?string $sorting = null, bool $alpha = false)
* @method $this ttl($key)
* @method $this type($key)
* @method $this unlink(string ...$keys)
* @method $this append($key, $value)
* @method $this arcount(string $key)
* @method $this ardel(string $key, int ...$index)
* @method $this ardelrange(string $key, int ...$startEnd)
* @method $this arget(string $key, int $index)
* @method $this argetrange(string $key, int $start, int $end)
* @method $this argrep(string $key, int $start, int $end, array $predicates, ?string $combinator = null, ?int $limit = null, bool $withValues = false, bool $noCase = false)
* @method $this arinfo(string $key, bool $full = false)
* @method $this arinsert(string $key, string ...$value)
* @method $this arlastitems(string $key, int $count, bool $reverse = false)
* @method $this arlen(string $key)
* @method $this armget(string $key, int ...$index)
* @method $this armset(string $key, array $indexValueDictionary)
* @method $this arnext(string $key)
* @method $this arop(string $key, int $start, int $end, string $operation, $matchValue = null)
* @method $this arring(string $key, int $size, string ...$value)
* @method $this arscan(string $key, int $start, int $end, ?int $limit = null)
* @method $this arseek(string $key, int $index)
* @method $this arset(string $key, int $index, string ...$value)
* @method $this bfadd(string $key, $item)
* @method $this bfexists(string $key, $item)
* @method $this bfinfo(string $key, string $modifier = '')
@@ -151,6 +171,7 @@ use Predis\Command\Redis\VADD;
* @method $this incr($key)
* @method $this incrby($key, $increment)
* @method $this incrbyfloat($key, $increment)
* @method $this increx(string $key, int|float|string $value, ?int $lbound = null, ?int $ubound = null, bool $saturate = false, ?string $expireType = null, $expireValue = null, bool $enx = false)
* @method $this mget(array $keys)
* @method $this mset(array $dictionary)
* @method $this msetex(array $dictionary, ?string $existModifier = null, ?string $expireResolution = null, ?int $expireTTL = null)
@@ -207,7 +228,7 @@ use Predis\Command\Redis\VADD;
* @method $this jsonobjkeys(string $key, string $path = '$')
* @method $this jsonobjlen(string $key, string $path = '$')
* @method $this jsonresp(string $key, string $path = '$')
* @method $this jsonset(string $key, string $path, string $value, ?string $subcommand = null)
* @method $this jsonset(string $key, string $path, string $value, ?string $subcommand = null, ?string $fpha = null)
* @method $this jsonstrappend(string $key, string $path, string $value)
* @method $this jsonstrlen(string $key, string $path = '$')
* @method $this jsontoggle(string $key, string $path)
@@ -299,6 +320,7 @@ use Predis\Command\Redis\VADD;
* @method $this xdel(string $key, string ...$id)
* @method $this xdelex(string $key, string $mode, array $ids)
* @method $this xlen(string $key)
* @method $this xnack(string $key, string $group, string $mode, array $ids, ?int $retryCount = null, bool $force = false)
* @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)
+1 -1
View File
@@ -4,7 +4,7 @@
* This file is part of the Predis package.
*
* (c) 2009-2020 Daniele Alessandri
* (c) 2021-2025 Till Krüss
* (c) 2021-2026 Till Krüss
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
+24 -2
View File
@@ -4,7 +4,7 @@
* This file is part of the Predis package.
*
* (c) 2009-2020 Daniele Alessandri
* (c) 2021-2025 Till Krüss
* (c) 2021-2026 Till Krüss
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
@@ -49,6 +49,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\HSETEX;
use Predis\Command\Redis\VADD;
use Predis\Configuration\OptionsInterface;
use Predis\Connection\ConnectionInterface;
@@ -86,7 +87,26 @@ use Predis\Response\Status;
* @method array sort_ro(string $key, ?string $byPattern = null, ?LimitOffsetCount $limit = null, array $getPatterns = [], ?string $sorting = null, bool $alpha = false)
* @method int ttl(string $key)
* @method mixed type(string $key)
* @method int unlink(string ...$keys)
* @method int append(string $key, $value)
* @method int arcount(string $key)
* @method int ardel(string $key, int ...$index)
* @method int ardelrange(string $key, int ...$startEnd)
* @method string|null arget(string $key, int $index)
* @method array argetrange(string $key, int $start, int $end)
* @method array argrep(string $key, int $start, int $end, array $predicates, ?string $combinator = null, ?int $limit = null, bool $withValues = false, bool $noCase = false)
* @method array arinfo(string $key, bool $full = false)
* @method int arinsert(string $key, string ...$value)
* @method array arlastitems(string $key, int $count, bool $reverse = false)
* @method int arlen(string $key)
* @method array armget(string $key, int ...$index)
* @method int armset(string $key, array $indexValueDictionary)
* @method int|null arnext(string $key)
* @method mixed arop(string $key, int $start, int $end, string $operation, $matchValue = null)
* @method int arring(string $key, int $size, string ...$value)
* @method array arscan(string $key, int $start, int $end, ?int $limit = null)
* @method int arseek(string $key, int $index)
* @method int arset(string $key, int $index, string ...$value)
* @method mixed bfadd(string $key, $item)
* @method mixed bfexists(string $key, $item)
* @method array bfinfo(string $key, string $modifier = '')
@@ -161,6 +181,7 @@ use Predis\Response\Status;
* @method int incr(string $key)
* @method int incrby(string $key, int $increment)
* @method string incrbyfloat(string $key, int|float $increment)
* @method array increx(string $key, int|float|string $value, ?int $lbound = null, ?int $ubound = null, bool $saturate = false, ?string $expireType = null, $expireValue = null, bool $enx = false)
* @method array mget(string[]|string $keyOrKeys, string ...$keys = null)
* @method mixed mset(array $dictionary)
* @method array msetex(array $dictionary, ?string $existModifier = null, ?string $expireResolution = null, ?int $expireTTL = null)
@@ -217,7 +238,7 @@ use Predis\Response\Status;
* @method array jsonobjkeys(string $key, string $path = '$')
* @method array jsonobjlen(string $key, string $path = '$')
* @method array jsonresp(string $key, string $path = '$')
* @method string jsonset(string $key, string $path, string $value, ?string $subcommand = null)
* @method string jsonset(string $key, string $path, string $value, ?string $subcommand = null, ?string $fpha = null)
* @method array jsonstrappend(string $key, string $path, string $value)
* @method array jsonstrlen(string $key, string $path = '$')
* @method array jsontoggle(string $key, string $path)
@@ -310,6 +331,7 @@ use Predis\Response\Status;
* @method int xdel(string $key, string ...$id)
* @method array xdelex(string $key, string $mode, array $ids)
* @method int xlen(string $key)
* @method int xnack(string $key, string $group, string $mode, array $ids, ?int $retryCount = null, bool $force = false)
* @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)
+23 -1
View File
@@ -4,7 +4,7 @@
* This file is part of the Predis package.
*
* (c) 2009-2020 Daniele Alessandri
* (c) 2021-2025 Till Krüss
* (c) 2021-2026 Till Krüss
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
@@ -42,6 +42,7 @@ abstract class ClusterStrategy implements StrategyInterface
/* commands operating on the key space */
'EXISTS' => $getKeyFromAllArguments,
'DEL' => $getKeyFromAllArguments,
'UNLINK' => $getKeyFromAllArguments,
'TYPE' => $getKeyFromFirstArgument,
'EXPIRE' => $getKeyFromFirstArgument,
'EXPIREAT' => $getKeyFromFirstArgument,
@@ -68,6 +69,7 @@ abstract class ClusterStrategy implements StrategyInterface
'INCR' => $getKeyFromFirstArgument,
'INCRBY' => $getKeyFromFirstArgument,
'INCRBYFLOAT' => $getKeyFromFirstArgument,
'INCREX' => $getKeyFromFirstArgument,
'SETBIT' => $getKeyFromFirstArgument,
'SETEX' => $getKeyFromFirstArgument,
'MSET' => [$this, 'getKeyFromInterleavedArguments'],
@@ -99,6 +101,26 @@ abstract class ClusterStrategy implements StrategyInterface
'LSET' => $getKeyFromFirstArgument,
'LTRIM' => $getKeyFromFirstArgument,
/* commands operating on arrays */
'ARCOUNT' => $getKeyFromFirstArgument,
'ARDEL' => $getKeyFromFirstArgument,
'ARDELRANGE' => $getKeyFromFirstArgument,
'ARGET' => $getKeyFromFirstArgument,
'ARGETRANGE' => $getKeyFromFirstArgument,
'ARGREP' => $getKeyFromFirstArgument,
'ARINFO' => $getKeyFromFirstArgument,
'ARINSERT' => $getKeyFromFirstArgument,
'ARLASTITEMS' => $getKeyFromFirstArgument,
'ARLEN' => $getKeyFromFirstArgument,
'ARMGET' => $getKeyFromFirstArgument,
'ARMSET' => $getKeyFromFirstArgument,
'ARNEXT' => $getKeyFromFirstArgument,
'AROP' => $getKeyFromFirstArgument,
'ARRING' => $getKeyFromFirstArgument,
'ARSCAN' => $getKeyFromFirstArgument,
'ARSEEK' => $getKeyFromFirstArgument,
'ARSET' => $getKeyFromFirstArgument,
/* commands operating on sets */
'SADD' => $getKeyFromFirstArgument,
'SCARD' => $getKeyFromFirstArgument,
@@ -4,7 +4,7 @@
* This file is part of the Predis package.
*
* (c) 2009-2020 Daniele Alessandri
* (c) 2021-2025 Till Krüss
* (c) 2021-2026 Till Krüss
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
@@ -4,7 +4,7 @@
* This file is part of the Predis package.
*
* (c) 2009-2020 Daniele Alessandri
* (c) 2021-2025 Till Krüss
* (c) 2021-2026 Till Krüss
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
+2 -2
View File
@@ -4,7 +4,7 @@
* This file is part of the Predis package.
*
* (c) 2009-2020 Daniele Alessandri
* (c) 2021-2025 Till Krüss
* (c) 2021-2026 Till Krüss
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
@@ -16,7 +16,7 @@ use Predis\Cluster\Hash\HashGeneratorInterface;
/**
* This class implements an hashring-based distributor that uses the same
* algorithm of memcache to distribute keys in a cluster using client-side
* algorithm of memcached to distribute keys in a cluster using client-side
* sharding.
* @author Lorenzo Castelli <lcastelli@gmail.com>
*/
+1 -1
View File
@@ -4,7 +4,7 @@
* This file is part of the Predis package.
*
* (c) 2009-2020 Daniele Alessandri
* (c) 2021-2025 Till Krüss
* (c) 2021-2026 Till Krüss
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
+1 -1
View File
@@ -4,7 +4,7 @@
* This file is part of the Predis package.
*
* (c) 2009-2020 Daniele Alessandri
* (c) 2021-2025 Till Krüss
* (c) 2021-2026 Till Krüss
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
+1 -1
View File
@@ -4,7 +4,7 @@
* This file is part of the Predis package.
*
* (c) 2009-2020 Daniele Alessandri
* (c) 2021-2025 Till Krüss
* (c) 2021-2026 Till Krüss
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
+1 -1
View File
@@ -4,7 +4,7 @@
* This file is part of the Predis package.
*
* (c) 2009-2020 Daniele Alessandri
* (c) 2021-2025 Till Krüss
* (c) 2021-2026 Till Krüss
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
+1 -1
View File
@@ -4,7 +4,7 @@
* This file is part of the Predis package.
*
* (c) 2009-2020 Daniele Alessandri
* (c) 2021-2025 Till Krüss
* (c) 2021-2026 Till Krüss
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
+1 -1
View File
@@ -4,7 +4,7 @@
* This file is part of the Predis package.
*
* (c) 2009-2020 Daniele Alessandri
* (c) 2021-2025 Till Krüss
* (c) 2021-2026 Till Krüss
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
+1 -1
View File
@@ -4,7 +4,7 @@
* This file is part of the Predis package.
*
* (c) 2009-2020 Daniele Alessandri
* (c) 2021-2025 Till Krüss
* (c) 2021-2026 Till Krüss
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
+7 -6
View File
@@ -4,7 +4,7 @@
* This file is part of the Predis package.
*
* (c) 2009-2020 Daniele Alessandri
* (c) 2021-2025 Till Krüss
* (c) 2021-2026 Till Krüss
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
@@ -87,7 +87,7 @@ class SlotMap implements ArrayAccess, IteratorAggregate, Countable
{
return array_reduce(
$this->slotRanges,
function ($carry, $slotRange) {
static function ($carry, $slotRange) {
return $carry + $slotRange->toArray();
},
[]
@@ -102,7 +102,7 @@ class SlotMap implements ArrayAccess, IteratorAggregate, Countable
public function getNodes()
{
return array_unique(array_map(
function ($slotRange) {
static function ($slotRange) {
return $slotRange->getConnection();
},
$this->slotRanges
@@ -192,7 +192,7 @@ class SlotMap implements ArrayAccess, IteratorAggregate, Countable
return array_reduce(
$intersections,
function ($carry, $slotRange) {
static function ($carry, $slotRange) {
return $carry + $slotRange->toArray();
},
[]
@@ -264,6 +264,7 @@ class SlotMap implements ArrayAccess, IteratorAggregate, Countable
foreach ($this->slotRanges as $slotRange) {
if (!$slotRange->hasSlot($slot)) {
$results[] = $slotRange;
continue;
}
if (static::isValidRange($slotRange->getStart(), $slot - 1)) {
@@ -287,7 +288,7 @@ class SlotMap implements ArrayAccess, IteratorAggregate, Countable
public function count()
{
return array_sum(array_map(
function ($slotRange) {
static function ($slotRange) {
return $slotRange->count();
},
$this->slotRanges
@@ -370,7 +371,7 @@ class SlotMap implements ArrayAccess, IteratorAggregate, Countable
{
usort(
$slotRanges,
function (SlotRange $a, SlotRange $b) {
static function (SlotRange $a, SlotRange $b) {
if ($a->getStart() == $b->getStart()) {
return 0;
}
+1 -1
View File
@@ -4,7 +4,7 @@
* This file is part of the Predis package.
*
* (c) 2009-2020 Daniele Alessandri
* (c) 2021-2025 Till Krüss
* (c) 2021-2026 Till Krüss
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
+1 -1
View File
@@ -4,7 +4,7 @@
* This file is part of the Predis package.
*
* (c) 2009-2020 Daniele Alessandri
* (c) 2021-2025 Till Krüss
* (c) 2021-2026 Till Krüss
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
@@ -4,7 +4,7 @@
* This file is part of the Predis package.
*
* (c) 2009-2020 Daniele Alessandri
* (c) 2021-2025 Till Krüss
* (c) 2021-2026 Till Krüss
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
+1 -1
View File
@@ -4,7 +4,7 @@
* This file is part of the Predis package.
*
* (c) 2009-2020 Daniele Alessandri
* (c) 2021-2025 Till Krüss
* (c) 2021-2026 Till Krüss
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
+1 -1
View File
@@ -4,7 +4,7 @@
* This file is part of the Predis package.
*
* (c) 2009-2020 Daniele Alessandri
* (c) 2021-2025 Till Krüss
* (c) 2021-2026 Till Krüss
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
+1 -1
View File
@@ -4,7 +4,7 @@
* This file is part of the Predis package.
*
* (c) 2009-2020 Daniele Alessandri
* (c) 2021-2025 Till Krüss
* (c) 2021-2026 Till Krüss
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
+1 -1
View File
@@ -4,7 +4,7 @@
* This file is part of the Predis package.
*
* (c) 2009-2020 Daniele Alessandri
* (c) 2021-2025 Till Krüss
* (c) 2021-2026 Till Krüss
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
+1 -1
View File
@@ -4,7 +4,7 @@
* This file is part of the Predis package.
*
* (c) 2009-2020 Daniele Alessandri
* (c) 2021-2025 Till Krüss
* (c) 2021-2026 Till Krüss
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
+1 -1
View File
@@ -4,7 +4,7 @@
* This file is part of the Predis package.
*
* (c) 2009-2020 Daniele Alessandri
* (c) 2021-2025 Till Krüss
* (c) 2021-2026 Till Krüss
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
@@ -4,7 +4,7 @@
* This file is part of the Predis package.
*
* (c) 2009-2020 Daniele Alessandri
* (c) 2021-2025 Till Krüss
* (c) 2021-2026 Till Krüss
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.

Some files were not shown because too many files have changed in this diff Show More