-
Notifications
You must be signed in to change notification settings - Fork 0
Update dependency predis/predis to v3 #24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
renovate
wants to merge
1
commit into
master
Choose a base branch
from
renovate/predis-predis-3.x
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Author
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
~1.0→~3.0Release Notes
predis/predis (predis/predis)
v3.3.0Compare Source
Added
XADD,XDELandXRANGE(#1587)HEXPIREandHEXPIRETIME(#1592)XREADGROUP_CLAIMcommand (#1608)MSETcommand (#1610)FT.HYBRID(#1607)Changed
v3.2.0Compare Source
Added
XDELEXandXACKDEL(#1580)Changed
XTRIMandXADDcommands with new parameters (#1580)Maintenance
v3.1.0Compare Source
Added
XACKcommand (#1555)XCLAIMcommand (#1557)XPENDINGcommand (#1558)XSETIDcommand (#1559)BITOPcommand operations (#1566)Changed
LOADINGerrors from Sentinel replicas (#1536)Fixed
stream_context_set_option()(#1545)ZCOUNTto beint(#1547)CommunicationExceptionwhen stream is EOF (#1548)conn_uidparameter assignment (#1552)XREADresponse parsing while read null (#1563)XINFOcommand responses parsing (#1560)v3.0.1Compare Source
Fixed
defaultuser if only password is used for authentication (#1535)v3.0.0Compare Source
Added
XGROUPcommands (#1324)XREADGROUPcommand (#1327)XAUTOCLAIMcommand (#1328)XINFOcommands (#1331)XREADandHSCANinterface changes (#1452)Changed
CLIENTcommand (#1337)DIALECTto2(#1516)Fixed
Maintenance
v2.4.1Compare Source
Fixed
ZCOUNTto beint(#1546)conn_uidparameter assignment (#1551)v2.4.0Compare Source
Added
FT._LISTandBITFIELD_ROcommands (#1521)Changed
WATCHcommand to acceptstring|string[](#1476)Fixed
EVAL_ROcluster support (#1449)stream_context_set_option()(#1503)GEOSEARCHas read-only to ensure execution on replica (#1481)MOVED/ASK(#1530)Maintenance
v2.3.0Compare Source
Added
GeoShapeFieldfield (#1467)IGNOREfilter (#1458)XREADcommands (#1459)NOVALUESargument support toHSCAN(#1459)INDEXMISSINGandINDEXEMPTYarguments (#1464)Changed
v2.2.2Compare Source
Added
client_infoclient parameterCLUSTERcontainer commandFixed
EXPIRETIMEnot usingprefixCLIENT SETINFOcalls by defaultv2.2.1Compare Source
Added
WAITAOFcommand (#1357)SHUTDOWNcommand (#1359)FUNCTIONcommand (#1332)PEXPIRE,PEXPIREATandCOMMANDKeyPrefixProcessor(#1358)Changed
v2.2.0Compare Source
Predis v2.2.0 introduces official support for Redis Stack as well as a Relay integration for substantially faster read performance.
Added
FCALL_ROcommand (#1191)JSON,Bloom,SearchandTimeSeriesmodule (#1253)ACL SETUSER, GETUSER, DRYRUNcommands (#1193)Changed
Fixed
XTRIMandXREVRANGEcommands (#1230)fclose()being called on invalid stream resource (#1199)BitByteandExpireOptionstraits skip processing on null values (#1169)@returnannotations (#1265)GETDELprefixing (#1306)v2.1.2Compare Source
Added
KeyPrefixProcessor(#1051)ReplicationStrategy::$loadBalancingoption to disable replica reads (#1168)FCALLandFUNCTIONScommands (#1049)PEXPIRETIMEcommand (#1031)EXPIRETIMEcommand (#1029)EVAL_ROcommand (#1032)LCScommand (#1035)SORT_ROcommand (#1044)SINTERCARDcommand (#1027)EVALSHA_ROcommand (#1034)BITPOSandBITCOUNTcommands (#1045)EXPIREandEXPIREATcommands (#1046)Bug Fixes
Deprecated
Maintenance
v2.1.1Compare Source
Bug Fixes
@templateinPredis\Client(#1017)ZINTERSTOREandZUNIONSTORE(#1018)Deprecated
v2.1.0Compare Source
New Features
GETEXcommand (#872)GETDELcommand (#869)COPYcommand (#866)FAILOVERcommand (#875)LMOVEcommand (#863)LMPOPcommand (#1013)HRANDFIELDcommand (#870)SMISMEMBERcommand (#871)ZMPOPcommand (#831)BLMOVEcommand (#865)BLMPOPcommand (#1015)BZMPOPcommand (#833)BZPOPMINcommand (#862)BZPOPMAXcommand (#864)ZUNIONcommand (#860)ZINTERcommand (#859)ZINTERCARDcommand (#861)ZRANGESTOREcommand (#829)ZDIFFSTOREcommand (#828)ZDIFFcommand (#826)ZRANDMEMBERcommand (#825)ZMSCORE(#823)GEOSEARCHcommand (#867)GEOSEARCHSTOREcommand (#873)Bug Fixes
Maintenance
v2.0.3Compare Source
is_resource()before reading/writingv2.0.2Compare Source
v2.0.1Compare Source
RedisClusterwith a default of10msConnection\Parametersv2.0.0Compare Source
Dropped support for PHP 7.1 and older
Accepted values for some client options have changed, this is the new list of
accepted values:
aggregate: callable returning an aggregate connection.cluster: string value (predis,redis), callable returning an aggregateconnection.
replication: string value (predis,sentinel), callable returning anaggregate connection.
commands: command factory, named array mapping command IDs to PHP classes,callable returning a command factory or a named array.
connections: connection factory, callable object returning a connectionfactory, named array mapping URI schemes to PHP classes, string identifying
a supported combination of configurations for the connection factory.
prefix: string value, command processor, callable.exceptions: boolean.Note that both the
clusterandreplicationoptions now return a closureacting as initializer instead of an aggregate connection instance.
The
connectionsclient option now accepts certain string values identifyingcertain combinations of configurations for the connection factory. Currently
this is used to provide a short way to configure Predis to load our phpiredis
based connection backends simply, accepted values are:
phpiredis-streammapsPhpiredis\Connection\PhpiredisStreamConnectiontotcp,redis,unixURI schemes.phpiredis-socketmapsPhpiredis\Connection\PhpiredisSocketConnectiontotcp,redis,unixURI schemes.phpiredis-streamis simply an alias ofphpiredis-stream.Added the new
Predis\Cluster\Hash\PhpiredisCRC16class using ext-phpiredisto speed-up the generation of the CRC16 hash of keys for redis-cluster. Predis
automatically uses this class when ext-phpiredis is loaded, but it is possible
to configure the hash generator using the new
crc16client option (acceptedvalues
predis,phpiredisor an hash generator instance).Replication backends now use the
roleparameter instead ofaliasin orderto distinguish the role of a connection. Accepted values are
master,slaveand, for redis-sentinel,
sentinel. This led to a redesign of how connectionscan be retrieved from replication backends: the method getConnectionById() now
retrieves a connection only by its ID (ip:port pair), to get a connection by
its alias there is the new method getConnectionByAlias(). This method is not
supported by the redis-sentinel backend due to its dynamic nature (connections
are retrieved and initialized at runtime from sentinels) but it is possible to
get a single connection from the pool by using its ID. It is also possible to
retrieve a connection by role using the method getConnectionByRole().
The concept of connection ID (ip:port pair) and connection alias (the
aliasparameter) in
Predis\Connection\Cluster\PredisClusterhas been separated.This change does not affect distribution and it is safe for existing clusters.
Client option classes now live in the
Predis\Configuration\Optionnamespace.Classes for Redis commands have been moved into the new
Predis\Command\Redisnamespace and each class name mirrors the respective Redis command ID.
The concept of server profiles is gone, the library now uses a single command
factory to create instances of commands classes. The
profileoption has beenreplaced by the
commandsoption acceptingPredis\Command\FactoryInterfaceto customize the underlying command factory. The default command factory class
used by Predis is
Predis\Command\RedisFactoryand it still allows developersto define or override commands with their own implementations. In addition to
that,
Predis\Command\RedisFactoryrelies on a convention-over-configurationapproach by looking for a suitable class with the same name as the command ID
in the
Predis\Command\Rediswhen the internal class map does not contain aclass associated.
The method
Predis\Client::getClientFor($connectionID)has been replaced bygetClientBy($selector, $value, $callable = null)which is more flexible asit is not limited to picking a connection from the underlying replication or
cluster backend by ID, but allows users to specify a
$selectorthat can beeither
id(the old behavior),key,slotorcommand. The client usesduck-typing instead of type-checking to verify that the underlying connection
implements a method that matches the specified selector which means that some
selectors may not be available to all kinds of connection backends.
The method
Predis\Client::getConnectionById($connectionID)has been removed.Changed the signature for the constructor of
Predis\Command\RawCommand.The
Predis\Connection\Aggregatenamespace has been split into two separatenamespaces for cluster backends (
Predis\Connection\Cluster) and replicationbackends (
Predis\Connection\Replication).The method
Predis\Connection\AggregateConnectionInterface::getConnection()has been renamed to
getConnectionByCommand().The methods
switchToMaster()andswitchToSlave()have been promoted to bepart of
Predis\Connection\Replication\ReplicationInterfacewhile the methodswitchTo($connection)has been removed from it.The method
Predis\Connection\Cluster\PredisCluster::executeCommandOnNodes()has been removed as it is possible to achieve the same by iterating over the
connection or, even better, over the client instance in order to execute the
same command against all of the registered connections.
The class
Predis\CommunicationExceptionnow uses the correct default typesfor the
$message(string) and$code(integer) parameters.The method
onConnectionError()inPredis\Connection\AbstractConnectionclass now passes the second argument as an integer value
0as its defaultvalue instead of
null.Support Pub/Sub and Pipelines when using replication
The class
Predis\Transaction\AbortedMultiExecExceptionnow uses the correctdefault types for the
$code(integer) parameter.FIX: using
strvalingetScanOptions()method, part ofPredis\Collection\Iterator\CursorBasedIteratorto make sure we retrieve thestring value of
$this->matchand not passingnulltostrlen()function.FIX: the value returned from
getArgument()inisReadOperation()method,part of
Predis\Replication\ReplicationStrategyclass, is checked to not passnulltosha1function.FIX: the value returned from
getArgument()inparseResponse()method,part of
Predis\Command\Redis\SENTINELclass, is checked to not passnullto
strtolower()function.v1.1.10: Predis v1.1.10Compare Source
Session/HandlerConnection/Aggregate/SentinelReplicationv1.1.9: Predis v1.1.9Compare Source
StreamConnectionv1.1.8: Predis v1.1.8Compare Source
v1.1.7: Predis v1.1.7Compare Source
spurious responses returned after reconnecting to Redis because the underlying
reader was not properly reset by discarding buffered replies after disconnecting
(ISSUE #363).
cweagans/composer-patchesdev dependency and apply patchesusing
post-update-cmdscript.v1.1.6: Predis v1.1.6Compare Source
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: Predis v1.1.5Compare Source
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 apasswordfor 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 ownpasswordparameter set in the parameters list despite this password is the same for all sentinels (read howrequirepassworks on the Redis docs). In this case you should avoid using the globalparametersclient 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
redisscheme and ausername:passwordpair is present. Values retrieved from the userinfo fragment always override the ones specified inusernameandpasswordif those fields are present in the query string.FIX:
Predis\Connection\WebdisConnectionwas 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
FALSEor any value evaluating toFALSEto thereplicationclient 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 anInvalidArgumentExceptionand a proper message. (PR #381).v1.1.4: Predis v1.1.4Compare Source
Here is a new patch release for
v1.1with 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
usernameandpasswordto connection parameters and Predis switches to using the augmented variant ofAUTH:As usual Redis servers protected only by a password can still be accessed with just the
passwordparameter. See the Redis documentation for more details about Redis ACLs.FIX:
NULLor zero-length string values inpasswordanddatabasedo not trigger spuriousAUTHandSELECTcommands anymore when connecting to Redis.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
NULLor a zero-length string will be stripped away when converting URI strings and named arrays to instances ofPredis\Connection\Parameters.FIX:
SORTnow always triggers a switch to the master node in replication configurations instead of just when theSTOREmodifier is specified. The reason for this change is thatSORTis always considered to be a write operation and it actually fails with a-READONLYerror 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).Using
foreach()actually makes sense when using aggregate connection backends for client-side sharding orredis-clusterbut 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\HashRing::addNodeToRing()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
@methodannotations for methods responding to Redis commands defined byPredis\ClientInterfaceandPredis\ClientContextInterface(PR #456 and PR #497, other fixes applied after further analysys).v1.1.3: Predis v1.1.3Compare Source
github.com/nrk/predistogithub.com/predis/predis.cweagans/composer-patchesdependency torequire-dev..patchfiles in exports.v1.1.2: Predis v1.1.2Compare Source
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
the input value passed to the
hash()method is an integer (PR #450).ZSCANandHSCANworking withPHP 7.2 due to a breaking change, namely the removal of
each()(PR #448).Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.