* 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>
* use static::class . '::<method>' instead of 'static::method'
* extract concatenation so it can be improved easier at a later point
one improvement at some point could be to replace static::class . '::<method>' with static::<method>(...) in PHP 8.1+
Co-authored-by: Alexandru Patranescu <alexandru.patranescu@payu.com>
* - init 8.1 tests
- adding `#[\ReturnTypeWillChange]`
- Fix deprecation message: strlen(): Passing null to parameter #1 ($string) of type string is deprecated
- null is not allowed
- cleanup
- default values should be same type
* Mirror `v1.1` fixes for these files
* add null as type too since we also accept null as default value
Signed-off-by: Zaher Ghaibeh <zaher@zaher.dev>
* revert back to assertNull
* Update CHANGELOG
* Update CHANGELOG.md
Co-authored-by: Till Krüss <tillkruss@users.noreply.github.com>
The behaviour of a raw command should not ever be overridden by users,
so this change is actually to enforce consistency through the library.
For the most part, raw commands are used internally by Predis to handle
management commands such as CLUSTER SLOTS, ROLE, etc...
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.
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.