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
- ๐ FIX: Avoid PHP 8.1 deprecation notices in
-
v1.1.9 Changes
October 05, 2021- ๐ FIX: Fixed PHP 8.1 compatibility in
StreamConnection
- ๐ FIX: Fixed PHP 8.1 compatibility in
-
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 โก๏ธ usingpost-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 apassword
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 ownpassword
parameter set in the parameters list despite this password is the same for all sentinels (read howrequirepass
works on the Redis docs). In this case you should avoid using the globalparameters
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 ausername:password
pair is present. Values retrieved from the userinfo fragment always override the ones specified inusername
andpassword
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 toFALSE
to thereplication
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 anInvalidArgumentException
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
andpassword
to connection parameters and Predis switches to using the augmented variant ofAUTH
:// 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 inpassword
anddatabase
do not trigger spuriousAUTH
andSELECT
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 ofPredis\Connection\Parameters
.๐ FIX :
SORT
now always triggers a switch to the master node in replication configurations instead of just when theSTORE
modifier is specified. The reason for this change is thatSORT
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 orredis-cluster
but there is no reason (and it is wrong anyway) to throw an exception inPredis\Client::getIterator()
when the client is connected to a single server.๐ FIX :
Predis\Cluster\Distributor\HashRingaddNodeToRing
was calculating the hash required for distribution by usingcrc32()
directly instead of the methodPredis\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 byPredis\ClientInterface
andPredis\ClientContextInterface
(PR #456 and PR #497, other fixes applied after further analysys). -
v1.1.3 Changes
August 18, 2020Ensure compatibility with PHP 8.
๐ Moved repository from
github.com/nrk/predis
togithub.com/predis/predis
.๐ FIX: Moved
cweagans/composer-patches
dependency torequire-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 thehash()
method is an integer (PR #450).๐ FIX : make PHP iterator abstractions for
ZSCAN
andHSCAN
working with
PHP 7.2 due to a breaking change, namely the removal ofeach()
(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
anddatabase
from the globalparameters
client option were still being applied to sentinels connections making them fail (sentinels do not understand theAUTH
andSELECT
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
- ๐ FIX :