* Added CommandResolver, moved resolve command logic there, added ClientConfiguration object
* Fixed test, added dependecies
* Added resolved command to commands array
* Used aggregation approach for modules
* Added decorator to check Redis JSON module version
* Added support for JSON.SET and JSON.GET commands
* Added separate workflow for redis-stack tests
* Changed docker imange name to correct one
* Fixed indentation
* Added test coverage for JSON.GET command
* Changed module version resolving using annotations mapping
* Re-written CommandResolver test
* Update ClientInterface.php
* Changes to CI, readme, removed unused modules from configuration
* Fixed build badge URL
* Refactored annotation check to be generic for each module
* Fixed bug with incorrect tests skip
* Added CommandResolver, moved resolve command logic there, added ClientConfiguration object
* Fixed test, added dependecies
* Added resolved command to commands array
* Used aggregation approach for modules
* Added decorator to check Redis JSON module version
* Added support for JSON.SET and JSON.GET commands
* Added separate workflow for redis-stack tests
* Changed docker imange name to correct one
* Fixed indentation
* Added test coverage for JSON.GET command
* Changed module version resolving using annotations mapping
* Re-written CommandResolver test
* Update ClientInterface.php
* Changes to CI, readme, removed unused modules from configuration
* Fixed build badge URL
* Refactored annotation check to be generic for each module
* Fixed bug with incorrect tests skip
* Fixed naming issue with nxXx argument
* Removed redundant trait
* Fixed NxXxArgument test
* add Redis stack tests
* don't run tests twice
* use
* Update stack.yml
* Rename workflows
* Added version 6.x to workflow
* Removed exception thrown to avoid version bug
* Resolve conflicts within tests.yml
* Codestyle fixes
* Removew trailing whitespaces
Co-authored-by: Vladyslav Vildanov <vladyslavvildanov@Vladyslav-Vildanov-MacBook-Pro.local>
Co-authored-by: Till Krüss <tillkruss@users.noreply.github.com>
- 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
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.
By default Predis now uses a convention-over-configuration approach
by looking for a command class in the Predis\Command\Redis namespace
if it is not already defined in the commands class map.
This change allow us to decrease the time needed to load Predis on
each request since we removed 99% of the mappings in the commands
class map. Classes defined in the internal class map still take the
precedence over this mechanism, so users can still define their own
command classes to handle each command.
This change reduces some unnecessary complexity in the library, Redis
commands do not change much after all. Developers can still implement
their own commands factory, inject new commands or override existing
ones. The "profile" client options has been renamed to "commands" and
it accepts instances of Predis\Command\FactoryInterface.
The test suite checks at runtime the version of the running instance
of Redis for integration tests to adapt itself automatically.