* Added arrayable arguments classes
* Updated count trait to accept additional modifier argument
* Added new With traits, moved into separate directory
* Added traits for geo command arguments resolving
* Remove BaseWith trait, not working with traits nesting
* Added AscDesc trait
* Rename AscDesc traint into Sorting
* Fixed trait keyword
* Removed unnecessary traits
* Updated count trait to handle default argument value
* Fixed With traits offset check condition
* Added GeoFrom, GeoBy traits
* Fixes for Count and Sorting traits
* Fixed variable names in with traits
* [WIP] Added GEOSEARCH command support, without test coverage
* Changed functionality to support only lower case units (Redis 6.0 support)
* Changed namespace for WITHSCORES trait
* Added more test coverage, added response parsing
* Added test coverage for tratis
* Added support for FAILOVER command
Co-authored-by: Vladyslav Vildanov <vladyslavvildanov@Vladyslav-Vildanov-MacBook-Pro.local>
* Added arrayable arguments classes
* Updated count trait to accept additional modifier argument
* Added new With traits, moved into separate directory
* Added traits for geo command arguments resolving
* Remove BaseWith trait, not working with traits nesting
* Added AscDesc trait
* Rename AscDesc traint into Sorting
* Fixed trait keyword
* Removed unnecessary traits
* Updated count trait to handle default argument value
* Fixed With traits offset check condition
* Added GeoFrom, GeoBy traits
* Fixes for Count and Sorting traits
* Fixed variable names in with traits
* [WIP] Added GEOSEARCH command support, without test coverage
* Changed functionality to support only lower case units (Redis 6.0 support)
* Changed namespace for WITHSCORES trait
* Added more test coverage, added response parsing
* Added support for GEOSEARCHSTORE command
* Added test coverage for tratis
Co-authored-by: Vladyslav Vildanov <vladyslavvildanov@Vladyslav-Vildanov-MacBook-Pro.local>
Co-authored-by: Chayim <chayim@users.noreply.github.com>
* Added arrayable arguments classes
* Updated count trait to accept additional modifier argument
* Added new With traits, moved into separate directory
* Added traits for geo command arguments resolving
* Remove BaseWith trait, not working with traits nesting
* Added AscDesc trait
* Rename AscDesc traint into Sorting
* Fixed trait keyword
* Removed unnecessary traits
* Updated count trait to handle default argument value
* Fixed With traits offset check condition
* Added GeoFrom, GeoBy traits
* Fixes for Count and Sorting traits
* Fixed variable names in with traits
* [WIP] Added GEOSEARCH command support, without test coverage
* Changed functionality to support only lower case units (Redis 6.0 support)
* Changed namespace for WITHSCORES trait
* Added more test coverage, added response parsing
* Added test coverage for tratis
Co-authored-by: Vladyslav Vildanov <vladyslavvildanov@Vladyslav-Vildanov-MacBook-Pro.local>
Co-authored-by: Chayim <chayim@users.noreply.github.com>
* Refactored zinterstore, zunionstore commands and command traits
* Merge conflicts resolve, update cluster strategy test with new arguments
* Updated assertion in case if command executed faster then duration minimal threshold
* Added support for ZINTER command
* Added command link and description
Co-authored-by: Vladyslav Vildanov <vladyslavvildanov@Vladyslav-Vildanov-MacBook-Pro.local>
* Refactored zinterstore, zunionstore commands and command traits
* Merge conflicts resolve, update cluster strategy test with new arguments
* Updated assertion in case if command executed faster then duration minimal threshold
* Updated Keys trait to handle cases when no numkeys modifier needed
* Added support for BZPOPMIN command
* Added command link and description
* Added support for BZPOPMAX command
* Added absract command to fix inheritance chain
Co-authored-by: Vladyslav Vildanov <vladyslavvildanov@Vladyslav-Vildanov-MacBook-Pro.local>
* Refactored zinterstore, zunionstore commands and command traits
* Merge conflicts resolve, update cluster strategy test with new arguments
* Updated assertion in case if command executed faster then duration minimal threshold
* Added support for ZUNION command
* Added command link and description
Co-authored-by: Vladyslav Vildanov <vladyslavvildanov@Vladyslav-Vildanov-MacBook-Pro.local>
* Refactored zinterstore, zunionstore commands and command traits
* Merge conflicts resolve, update cluster strategy test with new arguments
* Updated assertion in case if command executed faster then duration minimal threshold
* Updated Keys trait to handle cases when no numkeys modifier needed
* Added support for BZPOPMIN command
* Added command link and description
Co-authored-by: Vladyslav Vildanov <vladyslavvildanov@Vladyslav-Vildanov-MacBook-Pro.local>
* Refactored zinterstore, zunionstore commands and command traits
* Merge conflicts resolve, update cluster strategy test with new arguments
* Updated assertion in case if command executed faster then duration minimal threshold
* Updated Limit trait to handle integer values
* Updated Limit trait to return previous arguments if limit argument isn't set
* Added support for ZINTERCARD command
Co-authored-by: Vladyslav Vildanov <vladyslavvildanov@Vladyslav-Vildanov-MacBook-Pro.local>
* Added support for ZRANGESTORE command
* Added missing test coverage, added new filter method
* Added test coverage for new traits
* Updated offset for unexpected value tests
* Added missing offset
* Removed version annotation for inconsistency
* Update ZDIFF.php
* Update ZRANGESTORE.php
Co-authored-by: Vladyslav Vildanov <vladyslavvildanov@Vladyslav-Vildanov-MacBook-Pro.local>
Co-authored-by: Till Krüss <tillkruss@users.noreply.github.com>
* Added support for ZDIFF, added new WITHSCORE trait
* Added trait to resolve numkeys argument
* Added trait for unpacking keys array
* Added static binding for Numkeys trait
* Added ZDIFFSTORE command support
* Changed access modifier type to more strict
* Removed version annotation for inconsistency
* Update ZDIFFSTORE.php
Co-authored-by: Vladislav <vladislav@Admins-MacBook-Pro.local>
Co-authored-by: Vladyslav Vildanov <vladyslavvildanov@Vladyslav-Vildanov-MacBook-Pro.local>
Co-authored-by: Till Krüss <tillkruss@users.noreply.github.com>
* Added support for ZDIFF, added new WITHSCORE trait
* Added trait to resolve numkeys argument
* Added trait for unpacking keys array
* Added static binding for Numkeys trait
* Changed access modifier type to more strict
Co-authored-by: Vladislav <vladislav@Admins-MacBook-Pro.local>
Co-authored-by: Vladyslav Vildanov <vladyslavvildanov@Vladyslav-Vildanov-MacBook-Pro.local>
* Added support for ZRANDMEMBER, added test coverage
* Changed key to more specific on exception testing
Co-authored-by: Vladislav <vladislav@Admins-MacBook-Pro.local>
* set default nopass if password is not provided
* remove debug output
* added tests for noauth sentinel
* Update SentinelReplication.php
Co-authored-by: Mehmet Tolga Avcioglu <mehmet.avcioglu@pusula.net.tr>
Co-authored-by: Till Krüss <tillkruss@users.noreply.github.com>
Password-based authentication for sentinels has been added in Redis 5.
Predis was actively ignoring any "password" parameter for sentinels when
creating connections to them to avoid issues when this parameter is set
in the default "parameters" array passed via client options, as they are
applied to **every** connection created by Predis (see #346).
We need to find a better way to specify a common password for sentinels
to be handled in a different way than the ones for Redis nodes. For now
each sentinel node protected by password must have an explicit password
set in its parameters list even if this password, by design, is the same
for all sentinels. Since we cannot use default "parameters" as explained
above but we still need to pass a common value for all sentinels an idea
could be using a dedicated client option like we did with "service", but
we will see later.
In this commit we also explicitly reset any "username" parameter as it
would trigger an `AUTH $username $password` but sentinels do not support
ACL authentication.
Fixes#594.
While "replication" do accept values evaluating to TRUE, the same cannot
be said for values evaluating to FALSE. TRUE is used to tell the client
that we want replication handled using the default backend for unmanaged
replication setups. For using redis-sentinel the "sentinel" string value
must be passed.
Setting "replication" to FALSE led to a failure (and a PHP warning) on
client initialization because this condition was not handled properly.
Being able to do so would not make sense anyway: when the client does
not need to be set up to rely on replication, users simply have to omit
the option. Furthermore, users must always specify either "replication"
or "cluster" and not both with one of them set to FALSE.
Unfortunately options for aggregate connections in Predis v1.1 are a bit
of a mess, they did not scale well with the addition of new features and
are also quite inconsistent (e.g. "cluster" does not accept TRUE).
This has been largely fixed in Predis v2.0-dev but required implementing
a few breaking changes. It also means that this change does not need to
be ported to the main branch.
Addresses #381 using a different approach.
Basically assertMatchesRegularExpression() replaces assertRegExp() which
has been deprecated since PHPUnit 9.1 and will be removed in PHPUnit 10,
unfortunately we still depend on PHPUnit 8.4 to support PHP 7.2 and this
version does not have assertMatchesRegularExpression() so we implemented
it in our base testcase class with a fallback to the old assertRegExp()
when tests are executed on older versions of PHPUnit.
We still have disabled all PUB/SUB related tests on CI for now, until we
understand why they fail at random.
Backported from main branch (ref. 5133706, f723f67, eb8a89e)
See commit dd5d665 for the above mentioned changes.
Tests for Option\Aggregate, Option\Replication and Option\Cluster should
be refactored because code is a bit too repetitive and a bunch of tests
are shared among them (replication and cluster options extend aggregate
and share the same logic after all).