All Versions
37
Latest Version
Avg Release Cycle
175 days
Latest Release
142 days ago

Changelog History
Page 1

  • v1.1.10 Changes

    January 05, 2022
    • ๐Ÿ›  FIX: Avoid PHP 8.1 deprecation notices in Session/Handler
    • ๐Ÿ›  FIX: Fixed "Cannot use object of type Predis\Response\Error as array" error in Connection/Aggregate/SentinelReplication
  • v1.1.9 Changes

    October 05, 2021
    • ๐Ÿ›  FIX: Fixed PHP 8.1 compatibility in StreamConnection
  • v1.1.8 Changes

    September 29, 2021
    • ๐Ÿ›  FIX: Ensure compatibility with PHP 8.1.
  • v1.1.7 Changes

    April 04, 2021
    • ๐Ÿ›  FIX: with the phpiredis-based connection backends, failed pipelines led to spurious responses returned after reconnecting to Redis because the underlying reader was not properly reset by discarding buffered replies after disconnecting (ISSUE #363).
    • ๐Ÿ›  FIX: removed cweagans/composer-patches dev dependency and apply patches โšก๏ธ using post-update-cmd script.
  • v1.1.6 Changes

    September 11, 2020

    ๐Ÿš€ That was fast, but we had a bug in v1.1.5 so we needed to release a fix ASAP.

    ๐Ÿ›  FIX : reverted support for sentinels authentication implemented in v1.1.5 as it was bugged (see ISSUE #658), sorry for the trouble. This is now postponed as it requires a more thorough investigation.

  • v1.1.5 Changes

    September 10, 2020

    ๐Ÿš€ Here we have a new patch release!

    NOTE: We are still missing handlers for commands added in Redis 4, 5 and 6. We will get on par eventually, in the meanwhile you can define your own ones or use Predis\Client::executeRaw(). Read this post for details about how to properly implement support for new commands if you would like to add missing ones and share your work with us by creating pull requests, contributions are always greatly appreciated!

    ๐Ÿš€ NOTE intentionally commented out, please read the release notes for v1.1.6
    ๐Ÿ›  FIX : authentication for sentinels is now supported, previously it was not possible to specify a password for sentinels as its value was stripped during initialization because sentinels did not support authentication until Redis 5. Please note that with the current implementation each sentinel must have its own password parameter set in the parameters list despite this password is the same for all sentinels (read how requirepass works on the Redis docs). In this case you should avoid using the global parameters client option used to set default parameters for every connection created by Predis as this would end up using the same password even when connecting to actual Redis nodes. We are investiganting how to make it easier to specify the required password to access sentinels only once instead of repeating it for each sentinel.

    ๐Ÿ›  FIX : the username is now correctly retrieved from the userinfo fragment of the URI when using the redis scheme and a username:password pair is present. Values retrieved from the userinfo fragment always override the ones specified in username and password if those fields are present in the query string.

    ๐Ÿ›  FIX : Predis\Connection\WebdisConnection was unable to connect to Webdis when using an IPv4 address in the URL and this is probably due to some change in cURL internals since the last time we tested it.

    ๐Ÿ›  FIX : an exception is thrown when passing FALSE or any value evaluating to FALSE to the replication client option. This was supposed to be unsupported, in fact it actually breaks client initialization and raises a PHP warning. Now the user is alerted with an InvalidArgumentException and a proper message. (PR #381).

  • v1.1.4 Changes

    August 31, 2020

    ๐Ÿš€ Here is a new patch release for v1.1 with more improvements and fixes.

    NOTE: We are still missing handlers for commands added in Redis 4, 5 and 6. We will get on par eventually, in the meanwhile you can define your own ones or use Predis\Client::executeRaw(). Read this post for details about how to properly implement support for new commands if you would like to add missing ones and share your work with us by creating pull requests, contributions are always greatly appreciated!

    The client can now handle ACL authentication when connecting to Redis 6 , just pass both username and password to connection parameters and Predis switches to using the augmented variant of AUTH:

    // When using an URI string for parameters:$client = new Predis\Client('tcp://127.0.0.1?username=myuser&password=mypassword');// When using a named array for parameters:$client = new Predis\Client(['username' =\> 'myuser', 'password' =\> 'mypassword',]);
    

    ๐Ÿ“š As usual Redis servers protected only by a password can still be accessed with just the password parameter. See the Redis documentation for more details about Redis ACLs.

    ๐Ÿ›  FIX : NULL or zero-length string values in password and database do not trigger spurious AUTH and SELECT commands anymore when connecting to Redis.

    // Won't trigger `AUTH` and `SELECT`:$client = new Predis\Client('tcp://127.0.0.1?password=&database=');// Won't trigger `AUTH` and `SELECT`:$client = new Predis\Client(['password' =\> null, 'database' =\> '',]);
    

    ๐Ÿ‘€ This fix addresses some old issues with certain libraries and frameworks (see ISSUE #436).

    ๐Ÿš€ Empty connection parameters do not make much sense anyway so, in the next major release , any field containing NULL or a zero-length string will be stripped away when converting URI strings and named arrays to instances of Predis\Connection\Parameters.

    ๐Ÿ›  FIX : SORT now always triggers a switch to the master node in replication configurations instead of just when the STORE modifier is specified. The reason for this change is that SORT is always considered to be a write operation and it actually fails with a -READONLY error response when executed against a replica node (ISSUE #554).

    ๐Ÿ›  FIX : using foreach() on a client instance when it is connected to a single Redis server does not throw an exception anymore but the iteration will run for just one loop returning a new client for the underlying single-node connection (ISSUE #552, PR #556).

    $client = new Predis\Client('tcp://127.0.0.1');foreach ($client as $clientNode) { // Iterates just once, does not throw an exception anymore.}
    

    ๐Ÿ‘ป Using foreach() actually makes sense when using aggregate connection backends for client-side sharding or redis-cluster but there is no reason (and it is wrong anyway) to throw an exception in Predis\Client::getIterator() when the client is connected to a single server.

    ๐Ÿ›  FIX : Predis\Cluster\Distributor\HashRingaddNodeToRing was calculating the hash required for distribution by using crc32() directly instead of the method Predis\Cluster\Hash\HashGeneratorInterface::hash() implemented by the class itself. This fix does not have any impact on existing cluster deployments using client-side sharding based on this distributor simply because it does not take any external hash generators so distribution is not going to be affected.

    ๐Ÿ‘Œ Improved @method annotations for methods responding to Redis commands defined by Predis\ClientInterface and Predis\ClientContextInterface (PR #456 and PR #497, other fixes applied after further analysys).

  • v1.1.3 Changes

    August 18, 2020
    • Ensure compatibility with PHP 8.

    • ๐Ÿšš Moved repository from github.com/nrk/predis to github.com/predis/predis.

    • ๐Ÿ›  FIX: Moved cweagans/composer-patches dependency to require-dev.

    • ๐Ÿ›  FIX: Include PHPUnit .patch files in exports.

  • v1.1.2 Changes

    August 11, 2020

    ๐Ÿฑ Predis is under new management. Read the announcement and checkout the roadmap ๐Ÿš€

    ๐Ÿ‘ If you (or your business) would like to support the development of this fantastic library and ensure it's bright future, please use the GitHub Sponsor button ๐Ÿ™๐Ÿป

    ๐Ÿ”„ Changes

    ๐Ÿ›  FIX : pure CRC16 implementation failed to calculate the correct hash when
    the input value passed to the hash() method is an integer (PR #450).

    ๐Ÿ›  FIX : make PHP iterator abstractions for ZSCAN and HSCAN working with
    PHP 7.2 due to a breaking change, namely the removal of each() (PR #448).

  • v1.1.1 Changes

    June 17, 2016

    ๐Ÿš€ This is a patch release of Predis v1.1 that fixes a few bugs affecting the previous release. As usual you can read the CHANGELOG for a schematic list of the changes.

    ๐Ÿ› Bug fixes

    • ๐Ÿ›  FIX : password and database from the global parameters client option were still being applied to sentinels connections making them fail (sentinels do not understand the AUTH and SELECT commands) (PR #346).
    • ๐Ÿ›  FIX : when a sentinel instance reports no slave for a service, invoking connect() on the redis-sentinel connection backend should fall back to the master connection instead of failing (ISSUE #342).
    • ๐Ÿ›  FIX : the two connection backends based on ext-phpiredis has some kind of issues with the GC and the internal use of closures as reader callbacks that prevented connections going out of scope from being properly collected and the underlying stream or socket resources from being closed and freed. This should not have had any actual effect in real-world scenarios due to the lifecycle of PHP scripts, but we fixed it anyway (ISSUE #345).

    Other links