-
Notifications
You must be signed in to change notification settings - Fork 0
fix(deps): update dependency predis/predis to v2 #43
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
main
Choose a base branch
from
renovate/predis-predis-2.x
base: main
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
⚠ Artifact update problemRenovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is. ♻ Renovate will retry this branch, including artifacts, only when one of the following happens:
The artifact failure details are included below: File name: composer.lock
|
5dba154
to
56f5e3c
Compare
56f5e3c
to
ecef0c6
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
None yet
0 participants
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.1
->^2.0
Release Notes
predis/predis
v2.1.2
Compare Source
v2.1.1
Compare Source
v2.1.0
Compare Source
v2.0.3
Compare Source
is_resource()
before reading/writingv2.0.2
Compare Source
v2.0.1
Compare Source
RedisCluster
with a default of10ms
Connection\Parameters
v2.0.0
Compare 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
cluster
andreplication
options now return a closureacting as initializer instead of an aggregate connection instance.
The
connections
client 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-stream
mapsPhpiredis\Connection\PhpiredisStreamConnection
totcp
,redis
,unix
URI schemes.phpiredis-socket
mapsPhpiredis\Connection\PhpiredisSocketConnection
totcp
,redis
,unix
URI schemes.phpiredis-stream
is simply an alias ofphpiredis-stream
.Added the new
Predis\Cluster\Hash\PhpiredisCRC16
class 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
crc16
client option (acceptedvalues
predis
,phpiredis
or an hash generator instance).Replication backends now use the
role
parameter instead ofalias
in orderto distinguish the role of a connection. Accepted values are
master
,slave
and, 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
alias
parameter) in
Predis\Connection\Cluster\PredisCluster
has been separated.This change does not affect distribution and it is safe for existing clusters.
Client option classes now live in the
Predis\Configuration\Option
namespace.Classes for Redis commands have been moved into the new
Predis\Command\Redis
namespace 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
profile
option has beenreplaced by the
commands
option acceptingPredis\Command\FactoryInterface
to customize the underlying command factory. The default command factory class
used by Predis is
Predis\Command\RedisFactory
and it still allows developersto define or override commands with their own implementations. In addition to
that,
Predis\Command\RedisFactory
relies on a convention-over-configurationapproach by looking for a suitable class with the same name as the command ID
in the
Predis\Command\Redis
when 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
$selector
that can beeither
id
(the old behavior),key
,slot
orcommand
. 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\Aggregate
namespace 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\ReplicationInterface
while 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\CommunicationException
now uses the correct default typesfor the
$message
(string) and$code
(integer) parameters.The method
onConnectionError()
inPredis\Connection\AbstractConnection
class now passes the second argument as an integer value
0
as its defaultvalue instead of
null
.Support Pub/Sub and Pipelines when using replication
The class
Predis\Transaction\AbortedMultiExecException
now uses the correctdefault types for the
$code
(integer) parameter.FIX: using
strval
ingetScanOptions()
method, part ofPredis\Collection\Iterator\CursorBasedIterator
to make sure we retrieve thestring value of
$this->match
and not passingnull
tostrlen()
function.FIX: the value returned from
getArgument()
inisReadOperation()
method,part of
Predis\Replication\ReplicationStrategy
class, is checked to not passnull
tosha1
function.FIX: the value returned from
getArgument()
inparseResponse()
method,part of
Predis\Command\Redis\SENTINEL
class, is checked to not passnull
to
strtolower()
function.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 has been generated by Mend Renovate. View repository job log here.