Switch from server profiles to commands factory.

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.
This commit is contained in:
Daniele Alessandri
2016-06-04 11:06:44 +02:00
parent 6e3f301588
commit 62b421f20e
136 changed files with 1684 additions and 4741 deletions
+4 -4
View File
@@ -12,9 +12,9 @@
namespace Predis;
use Predis\Command\CommandInterface;
use Predis\Command\FactoryInterface;
use Predis\Configuration\OptionsInterface;
use Predis\Connection\ConnectionInterface;
use Predis\Profile\ProfileInterface;
/**
* Interface defining a client able to execute commands against Redis.
@@ -177,11 +177,11 @@ use Predis\Profile\ProfileInterface;
interface ClientInterface
{
/**
* Returns the server profile used by the client.
* Returns the command factory used by the client.
*
* @return ProfileInterface
* @return FactoryInterface
*/
public function getProfile();
public function getCommandFactory();
/**
* Returns the client options specified upon initialization.