* 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>
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.
- Make use of more typehints for function parameters
- Make use of typehints for function return values
- Use @var where needed to give proper hints to IDEs and avoid warnings
- Replace MockObject::setMethods() with addMethods() and onlyMethods()
- Rewording of some phpdocs
Any command ID will produce a command instance even for unknown commands
not implemented by Redis (the server will return a -ERR error response).
When using this factory the client does not process arguments before
sending commands to Redis and server responses are not further processed
before being returned to the caller.
We have renamed most methods to drop the "command" suffix as it is quite
redundant. Due to this change and thanks to variadic methods introduced
with PHP 5.6 we took the opportunity to replace both "supportsCommand()"
and "supportsCommands()" with a single new method "supports()".
Added more stringent typehints for method arguments and typehints for
return values now that we do not need to support anything below PHP 7.2.
Also moved from using array() to [] in source code of class involved.
Starting with Redis 6.0 and the introduction of Access Control Lists,
COMMAND INFO returns an additional array for each specified command in
the request with a list of the ACL categories associated to a command.
The previous implementation was not good because we were exposing in the
public API an internal implementation detail of the base factory class,
furthermore it made Predis\Command\Factory::define() confusing. Having a
separate method to undefine commands in the factory is self-explanatory.
We also changed `Predis\Configuration\Option\Commands` accordingly when
a dictionary of $commandID => $classCommand is passed to the "commands"
client option and $classCommand is NULL.
A few minor changes (mostly cosmetic or documentation) were applied too.
From feedback to PR #644.