redis

PHP extension for interfacing with Redis


This extension provides an API for communicating with Redis servers.

License: PHP

Latest releases

Version Release Download
6.1.0 2024-10-04 redis-6.1.0.tgz
6.1.0RC2 2024-09-23 redis-6.1.0RC2.tgz
6.1.0RC1 2024-08-04 redis-6.1.0RC1.tgz
6.0.2 2023-10-22 redis-6.0.2.tgz
6.0.1 2023-09-23 redis-6.0.1.tgz
Show all releases

Changelog

Version Message
6.1.0 Sponsors

Audiomack - https://audiomack.com
Open LMS - https://openlms.net
Avtandil Kikabidze - https://github.com/akalongman
Ty Karok - https://github.com/karock
Object Cache Pro for WordPress - https://objectcache.pro

--- 6.1.0 ---

NOTE: There were no changes to C code between 6.1.0RC2 and 6.1.0

Documentation:

* Update package.xml to make it clearer that we support many key-value stores
[52e69ede] (Remi Collet)
* Fix redis.io urls [0bae4bb0] (Vincent Langlet)

Tests/CI:

* Fix 2 tests with redis 6.2 [cc1be322] (Remi Collet)

--- 6.1.0RC2 ---

Fixed:

* Fixed a `SIGABRT` error in PHP 8.4 [a75a7e5a] (Michael Grunder)
* Clean up code for unsupported versions of PHP [37cebdd7] (Remi Collet)
* Add `SessionHelpers.php` to `package.xml`[e9474b80] (Remi Collet)
* 8.4 implicit null fix, bump version [bff3a22e, 30c8f90c] [Remi Collet]

Changed:

* Raised minimum supported PHP version to 7.4 [8b519423] (Michael Grunder)

Removed:

* Removed erroneously duplicated changelog entries [40c89736] (Michael Grunder)

Tests/CI:

* Move to upload artifacts v4 [9d380500] (Michael Grunder)

Added:

* Added `composer.json` to support PIE (PHP Installer for Extensions) [b59e35a6]
(James Titcumb)

--- 6.1.0RC1 ---

Fixed:

* Fix random connection timeouts with Redis Cluster. [eb7f31e7] (Jozsef Koszo)
* Fix argument count issue in HSET with associative array [6ea5b3e0]
(Viktor Djupsjobacka)
* SRANDMEMBER can return any type because of serialization. [6673b5b2]
(Michael Grunder)
* Fix HRANDFIELD command when WITHVALUES is used. [99f9fd83] (Michael Grunder)
* Allow context array to be nullable [50529f56] (Michael Grunder)
* Fix a macOS (M1) compiler warning. [7de29d57] (Michael Grunder)
* `GETEX` documentation/updates and implentation in `RedisCluster` [981c6931]
(Michael Grunder)
* Refactor redis_script_cmd and fix to `flush` subcommand. [7c551424]
(Pavlo Yatsukhnenko)
* Update liveness check and fix PHP 8.4 compilation error. [c139de3a]
(Michael Grunder)
* Rework how we declare ZSTD min/max constants. [34b5bd81] (Michael Grunder)
* Fix memory leak if we fail in ps_open_redis. [0e926165] (Michael Grunder)
* Fix segfault and remove redundant macros [a9e53fd1] (Pavlo Yatsukhnenko)
* Fix PHP 8.4 includes [a51215ce] (Michael Grunder)
* Handle arbitrarily large `SCAN` cursors properly. [2612d444, e52f0afa]
(Michael Grunder)
* Improve warning when we encounter an invalid EXPIRY in SET [732e466a]
(Michael Grunder)
* Fix Arginfo / zpp mismatch for DUMP command [50e5405c] (Pavlo Yatsukhnenko)
* RedisCluster::publish returns a cluster_long_resp [14f93339] (Alexandre Choura)
* Fix segfault when passing just false to auth. [6dc0a0be] (Michael Grunder)
* the VALUE argument type for hSetNx must be the same as for hSet [df074dbe]
(Uladzimir Tsykun)
* Other fixes [e18f6c6d, 3d7be358, 2b555c89, fa1a283a, 37c5f8d4] (Michael Grunder, Viktor Szepe)

Added:

* Compression support for PHP sessions. [da4ab0a7] (bitactive)
* Support for early_refresh in Redis sessions to match cluster behavior
[b6989018] (Bitactive)
* Implement WAITAOF command. [ed7c9f6f] (Michael Grunder)

Removed:

* PHP 7.1, 7.2, and 7.3 CI jobs [d68c30f8, dc39bd55] (Michael Grunder)

Changed:

* Fix the time unit of retry_interval [3fdd52b4] (woodong)

Documentation:

* Many documentation fixes. [eeb51099] (Michael Dwyer)
* fix missing code tags [f865d5b9] (divinity76)
* Mention Valkey support [5f1eecfb] (PlavorSeol)
* Mention KeyDB support in README.md [37fa3592] (Tim Starling)
* Remove mention of pickle [c7a73abb] (David Baker)
* Add session.save_path examples [8a39caeb] (Martin Vancl)
* Tighter return types for Redis::(keys|hKeys|hVals|hGetAll) [77ab62bc]
(Benjamin Morel)
* Update stubs [4d233977, ff305349, 12966a74, a4a283ab, 8f8ff72a]
(Michael Grunder, Takayasu Oyama, Pavlo Yatsukhnenko)
* Fix config.m4 when using custom dep paths [ece3f7be] (Michael Grunder)
* Fix retry_internal documentation [142c1f4a] (SplotyCode)
* Fix anchor link [9b5cad31] (Git'Fellow)
* Fix typo in link [bfd379f0] (deiga)
* Fix Fedora package url [60b1ba14, 717713e1] (Dmitrii Kotov)
* Update Redis Sentinel documentation to reflect changes to constructor in 6.0
release [dc05d65c] (Pavlo Yatsukhnenko)

Tests/CI:

* Avoid fatal error in test execution. [57304970] (Michael Grunder)
* Refactor unit test framework. [b1771def] (Michael Grunder)
* Get unit tests working in `php-cgi`. [b808cc60] (Michael Grunder)
* Switch to `ZEND_STRL` in more places. [7050c989, f8c762e7] (Michael Grunder)
* Workaround weird PHP compiler crash. [d3b2d87b] (Michael Grunder)
* Refactor tests (formatting, modernization, etc). [dab6a62d, c6cd665b, 78b70ca8,
3c125b09, 18b0da72, b88e72b1, 0f94d9c1, 59965971, 3dbc2bd8, 9b90c03b, c0d6f042]
(Michael Grunder)
* Spelling fixes [0d89e928] (Michael Grunder)
* Added Valkey support. [f350dc34] (Michael Grunder)
* Add a test for session compression. [9f3ca98c] (Michael Grunder)
* Test against valkey [a819a44b] (Michael Grunder)
* sessionSaveHandler injection. [9f8f80ca] (Pavlo Yatsukhnenko)
* KeyDB addiions [54d62c72, d9c48b78] (Michael Grunder)
* Add PHP 8.3 to CI [78d15140, e051a5db] (Robert Kelcak, Pavlo Yatsukhnenko)
* Use newInstance in RedisClusterTest [954fbab8] (Pavlo Yatsukhnenko)
* Use actions/checkout@v4 [f4c2ac26] (Pavlo Yatsukhnenko)
* Cluster nodes from ENV [eda39958, 0672703b] (Pavlo Yatsukhnenko)
* Ensure we're talking to redis-server in our high ports test. [7825efbc]
(Michael Grunder)
* Add missing option to installation example [2bddd84f] (Pavlo Yatsukhnenko)
* Fix typo in link [8f6bc98f] (Timo Sand)
* Update tests to allow users to use a custom class. [5f6ce414] (Michael Grunder)
6.1.0RC2 Sponsors

Audiomack - https://audiomack.com
Open LMS - https://openlms.net
Avtandil Kikabidze - https://github.com/akalongman
Ty Karok - https://github.com/karock
Object Cache Pro for WordPress - https://objectcache.pro

--- 6.1.0RC2 ---

Fixed:

* Fixed a `SIGABRT` error in PHP 8.4 [a75a7e5a] (Michael Grunder)
* Clean up code for unsupported versions of PHP [37cebdd7] (Remi Collet)
* Add `SessionHelpers.php` to `package.xml`[e9474b80] (Remi Collet)
* 8.4 implicit null fix, bump version [bff3a22e, 30c8f90c] [Remi Collet]

Changed:

* Raised minimum supported PHP version to 7.4 [8b519423] (Michael Grunder)

Removed:

* Removed erroneously duplicated changelog entries [40c89736] (Michael Grunder)

Tests/CI:

* Move to upload artifacts v4 [9d380500] (Michael Grunder)

Added:

* Added `composer.json` to support PIE (PHP Installer for Extensions) [b59e35a6]
(James Titcumb)

--- 6.1.0RC1 ---

Fixed:

* Fix random connection timeouts with Redis Cluster. [eb7f31e7] (Jozsef Koszo)
* Fix argument count issue in HSET with associative array [6ea5b3e0]
(Viktor Djupsjobacka)
* SRANDMEMBER can return any type because of serialization. [6673b5b2]
(Michael Grunder)
* Fix HRANDFIELD command when WITHVALUES is used. [99f9fd83] (Michael Grunder)
* Allow context array to be nullable [50529f56] (Michael Grunder)
* Fix a macOS (M1) compiler warning. [7de29d57] (Michael Grunder)
* `GETEX` documentation/updates and implentation in `RedisCluster` [981c6931]
(Michael Grunder)
* Refactor redis_script_cmd and fix to `flush` subcommand. [7c551424]
(Pavlo Yatsukhnenko)
* Update liveness check and fix PHP 8.4 compilation error. [c139de3a]
(Michael Grunder)
* Rework how we declare ZSTD min/max constants. [34b5bd81] (Michael Grunder)
* Fix memory leak if we fail in ps_open_redis. [0e926165] (Michael Grunder)
* Fix segfault and remove redundant macros [a9e53fd1] (Pavlo Yatsukhnenko)
* Fix PHP 8.4 includes [a51215ce] (Michael Grunder)
* Handle arbitrarily large `SCAN` cursors properly. [2612d444, e52f0afa]
(Michael Grunder)
* Improve warning when we encounter an invalid EXPIRY in SET [732e466a]
(Michael Grunder)
* Fix Arginfo / zpp mismatch for DUMP command [50e5405c] (Pavlo Yatsukhnenko)
* RedisCluster::publish returns a cluster_long_resp [14f93339] (Alexandre Choura)
* Fix segfault when passing just false to auth. [6dc0a0be] (Michael Grunder)
* the VALUE argument type for hSetNx must be the same as for hSet [df074dbe]
(Uladzimir Tsykun)
* Other fixes [e18f6c6d, 3d7be358, 2b555c89, fa1a283a, 37c5f8d4] (Michael Grunder, Viktor Szepe)

Added:

* Compression support for PHP sessions. [da4ab0a7] (bitactive)
* Support for early_refresh in Redis sessions to match cluster behavior
[b6989018] (Bitactive)
* Implement WAITAOF command. [ed7c9f6f] (Michael Grunder)

Removed:

* PHP 7.1, 7.2, and 7.3 CI jobs [d68c30f8, dc39bd55] (Michael Grunder)

Changed:

* Fix the time unit of retry_interval [3fdd52b4] (woodong)

Documentation:

* Many documentation fixes. [eeb51099] (Michael Dwyer)
* fix missing code tags [f865d5b9] (divinity76)
* Mention Valkey support [5f1eecfb] (PlavorSeol)
* Mention KeyDB support in README.md [37fa3592] (Tim Starling)
* Remove mention of pickle [c7a73abb] (David Baker)
* Add session.save_path examples [8a39caeb] (Martin Vancl)
* Tighter return types for Redis::(keys|hKeys|hVals|hGetAll) [77ab62bc]
(Benjamin Morel)
* Update stubs [4d233977, ff305349, 12966a74, a4a283ab, 8f8ff72a]
(Michael Grunder, Takayasu Oyama, Pavlo Yatsukhnenko)
* Fix config.m4 when using custom dep paths [ece3f7be] (Michael Grunder)
* Fix retry_internal documentation [142c1f4a] (SplotyCode)
* Fix anchor link [9b5cad31] (Git'Fellow)
* Fix typo in link [bfd379f0] (deiga)
* Fix Fedora package url [60b1ba14, 717713e1] (Dmitrii Kotov)
* Update Redis Sentinel documentation to reflect changes to constructor in 6.0
release [dc05d65c] (Pavlo Yatsukhnenko)

Tests/CI:

* Avoid fatal error in test execution. [57304970] (Michael Grunder)
* Refactor unit test framework. [b1771def] (Michael Grunder)
* Get unit tests working in `php-cgi`. [b808cc60] (Michael Grunder)
* Switch to `ZEND_STRL` in more places. [7050c989, f8c762e7] (Michael Grunder)
* Workaround weird PHP compiler crash. [d3b2d87b] (Michael Grunder)
* Refactor tests (formatting, modernization, etc). [dab6a62d, c6cd665b, 78b70ca8,
3c125b09, 18b0da72, b88e72b1, 0f94d9c1, 59965971, 3dbc2bd8, 9b90c03b, c0d6f042]
(Michael Grunder)
* Spelling fixes [0d89e928] (Michael Grunder)
* Added Valkey support. [f350dc34] (Michael Grunder)
* Add a test for session compression. [9f3ca98c] (Michael Grunder)
* Test against valkey [a819a44b] (Michael Grunder)
* sessionSaveHandler injection. [9f8f80ca] (Pavlo Yatsukhnenko)
* KeyDB addiions [54d62c72, d9c48b78] (Michael Grunder)
* Add PHP 8.3 to CI [78d15140, e051a5db] (Robert Kelcak, Pavlo Yatsukhnenko)
* Use newInstance in RedisClusterTest [954fbab8] (Pavlo Yatsukhnenko)
* Use actions/checkout@v4 [f4c2ac26] (Pavlo Yatsukhnenko)
* Cluster nodes from ENV [eda39958, 0672703b] (Pavlo Yatsukhnenko)
* Ensure we're talking to redis-server in our high ports test. [7825efbc]
(Michael Grunder)
* Add missing option to installation example [2bddd84f] (Pavlo Yatsukhnenko)
* Fix typo in link [8f6bc98f] (Timo Sand)
* Update tests to allow users to use a custom class. [5f6ce414] (Michael Grunder)
6.1.0RC1 Sponsors

Audiomack - https://audiomack.com
Open LMS - https://openlms.net
Avtandil Kikabidze - https://github.com/akalongman
Ty Karok - https://github.com/karock
Object Cache Pro for WordPress - https://objectcache.pro

Fixed:

* Fix random connection timeouts with Redis Cluster. [eb7f31e7] (Jozsef Koszo)
* Fix argument count issue in HSET with associative array [6ea5b3e0]
(Viktor Djupsjobacka)
* SRANDMEMBER can return any type because of serialization. [6673b5b2]
(Michael Grunder)
* Fix HRANDFIELD command when WITHVALUES is used. [99f9fd83] (Michael Grunder)
* Allow context array to be nullable [50529f56] (Michael Grunder)
* Fix a macOS (M1) compiler warning. [7de29d57] (Michael Grunder)
* `GETEX` documentation/updates and implentation in `RedisCluster` [981c6931]
(Michael Grunder)
* Refactor redis_script_cmd and fix to `flush` subcommand. [7c551424]
(Pavlo Yatsukhnenko)
* Update liveness check and fix PHP 8.4 compilation error. [c139de3a]
(Michael Grunder)
* Rework how we declare ZSTD min/max constants. [34b5bd81] (Michael Grunder)
* Fix memory leak if we fail in ps_open_redis. [0e926165] (Michael Grunder)
* Fix segfault and remove redundant macros [a9e53fd1] (Pavlo Yatsukhnenko)
* Fix PHP 8.4 includes [a51215ce] (Michael Grunder)
* Handle arbitrarily large `SCAN` cursors properly. [2612d444, e52f0afa]
(Michael Grunder)
* Improve warning when we encounter an invalid EXPIRY in SET [732e466a]
(Michael Grunder)
* Fix Arginfo / zpp mismatch for DUMP command [50e5405c] (Pavlo Yatsukhnenko)
* RedisCluster::publish returns a cluster_long_resp [14f93339] (Alexandre Choura)
* Fix segfault when passing just false to auth. [6dc0a0be] (Michael Grunder)
* the VALUE argument type for hSetNx must be the same as for hSet [df074dbe]
(Uladzimir Tsykun)
* Fix `PSUBSCRIBE` to find callback by pattern not string literal. [2f276dcd]
(Michael Grunder)
* Fix memory leak and segfault in Redis::exec [362e1141] (Pavlo Yatsukhnenko)
* Fix unknown expiration modifier warning when null argument passed [264c0c7e,
3eb60f58] (Pavlo Yatsukhnenko)
* Other fixes [e18f6c6d, 3d7be358, 2b555c89, fa1a283a, 37c5f8d4] (Michael Grunder, Viktor Szepe)

Added:

* Compression support for PHP sessions. [da4ab0a7] (bitactive)
* Support for early_refresh in Redis sessions to match cluster behavior
[b6989018] (Bitactive)
* Implement WAITAOF command. [ed7c9f6f] (Michael Grunder)

Removed:

* PHP 7.1, 7.2, and 7.3 CI jobs [d68c30f8, dc39bd55] (Michael Grunder)

Changed:

* Fix the time unit of retry_interval [3fdd52b4] (woodong)

Documentation:

* Many documentation fixes. [eeb51099] (Michael Dwyer)
* fix missing code tags [f865d5b9] (divinity76)
* Mention Valkey support [5f1eecfb] (PlavorSeol)
* Mention KeyDB support in README.md [37fa3592] (Tim Starling)
* Remove mention of pickle [c7a73abb] (David Baker)
* Add session.save_path examples [8a39caeb] (Martin Vancl)
* Tighter return types for Redis::(keys|hKeys|hVals|hGetAll) [77ab62bc]
(Benjamin Morel)
* Update stubs [4d233977, ff305349, 12966a74, a4a283ab, 8f8ff72a, 5d293245,
95bd184b] (Michael Grunder, Takayasu Oyama, Pavlo Yatsukhnenko)
* Fix config.m4 when using custom dep paths [ece3f7be] (Michael Grunder)
* Fix retry_internal documentation [142c1f4a] (SplotyCode)
* Fix anchor link [9b5cad31] (Git'Fellow)
* Fix typo in link [bfd379f0] (deiga)
* Fix Fedora package url [60b1ba14, 717713e1] (Dmitrii Kotov)
* Update Redis Sentinel documentation to reflect changes to constructor in 6.0
release [dc05d65c] (Pavlo Yatsukhnenko)
* Add back old examples with note [1ad95b63] (Joost)

Tests/CI:

* Avoid fatal error in test execution. [57304970] (Michael Grunder)
* Refactor unit test framework. [b1771def] (Michael Grunder)
* Get unit tests working in `php-cgi`. [b808cc60] (Michael Grunder)
* Switch to `ZEND_STRL` in more places. [7050c989, f8c762e7] (Michael Grunder)
* Workaround weird PHP compiler crash. [d3b2d87b] (Michael Grunder)
* Refactor tests (formatting, modernization, etc). [dab6a62d, c6cd665b, 78b70ca8,
3c125b09, 18b0da72, b88e72b1, 0f94d9c1, 59965971, 3dbc2bd8, 9b90c03b, c0d6f042]
(Michael Grunder)
* Spelling fixes [0d89e928] (Michael Grunder)
* Added Valkey support. [f350dc34] (Michael Grunder)
* Add a test for session compression. [9f3ca98c] (Michael Grunder)
* Test against valkey [a819a44b] (Michael Grunder)
* sessionSaveHandler injection. [9f8f80ca] (Pavlo Yatsukhnenko)
* KeyDB addiions [54d62c72, d9c48b78] (Michael Grunder)
* Add PHP 8.3 to CI [78d15140, e051a5db] (Robert Kelcak, Pavlo Yatsukhnenko)
* Fix deprecation error when passing null to match_type parameter [b835aaa3]
(Pavlo Yatsukhnenko)
* Fix crash in `OBJECT` command in pipeline. [a7f51f70] (Michael Grunder)
* Use newInstance in RedisClusterTest [954fbab8] (Pavlo Yatsukhnenko)
* Use actions/checkout@v4 [f4c2ac26] (Pavlo Yatsukhnenko)
* Cluster nodes from ENV [eda39958, 0672703b] (Pavlo Yatsukhnenko)
* Ensure we're talking to redis-server in our high ports test. [7825efbc]
(Michael Grunder)
* Add missing option to installation example [2bddd84f] (Pavlo Yatsukhnenko)
* Update sentinel documentation to reflect changes to constructor in 6.0 release
[849bedb6] (Joost)
* Add missing option to example [3674d663] (Till Kruss)
* Fix typo in link [8f6bc98f] (Timo Sand)
* Update tests to allow users to use a custom class. [5f6ce414] (Michael Grunder)
6.0.2 --- Sponsors ---

Audiomack - https://audiomack.com
Open LMS - https://openlms.net
BlueHost - https://bluehost.com
Object Cache Pro for WordPress - https://objectcache.pro
Avtandil Kikabidze - https://github.com/akalongman
Zaher Ghaibeh - https://github.com/zaherg
BatchLabs - https://batch.com
Stackhero - https://github.com/stackhero-io
Florian Levis - https://github.com/Gounlaf
Luis Zarate - https://github.com/jlzaratec

---

phpredis 6.0.2

This release contains fixes for OBJECT, PSUBSCRIBE and SCAN commands.
You can find a detailed list of changes in CHANGELOG.md and package.xml
or by inspecting the git commit logs.

* Fix deprecation error when passing null to match_type parameter.[b835aaa3] (Pavlo Yatsukhnenko)
* Fix flaky test and OBJECT in a pipeline. [a7f51f70] (Michael Grunder)
* Find our callback by pattern with PSUBSCRIBE [2f276dcd] (Michael Grunder)
6.0.1 --- Sponsors ---

Audiomack - https://audiomack.com
Open LMS - https://openlms.net
BlueHost - https://bluehost.com
Object Cache Pro for WordPress - https://objectcache.pro
Avtandil Kikabidze - https://github.com/akalongman
Zaher Ghaibeh - https://github.com/zaherg
BatchLabs - https://batch.com
Stackhero - https://github.com/stackhero-io
Florian Levis - https://github.com/Gounlaf
Luis Zarate - https://github.com/jlzaratec

---

phpredis 6.0.1

This release contains fix for unknown expiration modifier issue
as well as memory leak and segfault in exec function
and small documentation improvements.

You can find a detailed list of changes in CHANGELOG.md and package.xml
or by inspecting the git commit logs.

* Fix memory leak and segfault in Redis::exec [362e1141] (Pavlo Yatsukhnenko), (Markus Podar)
* Fix unknown expiration modifier [264c0c7e, 95bd184b] (Pavlo Yatsukhnenko)
* Update documentation [3674d663, 849bedb6, 1ad95b63] (Till Kruss), (Joost OrangeJuiced)
Show complete changelog