From 9e2017064df6e7681140065ca484bb3a469b67c3 Mon Sep 17 00:00:00 2001 From: Hunter Skrasek Date: Mon, 7 May 2018 22:04:50 -0500 Subject: [PATCH 1/3] Add a new interfact for redis connections Signed-off-by: Hunter Skrasek --- .../Redis/Connections/Connection.php | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 src/Illuminate/Contracts/Redis/Connections/Connection.php diff --git a/src/Illuminate/Contracts/Redis/Connections/Connection.php b/src/Illuminate/Contracts/Redis/Connections/Connection.php new file mode 100644 index 000000000000..13f1db84e059 --- /dev/null +++ b/src/Illuminate/Contracts/Redis/Connections/Connection.php @@ -0,0 +1,35 @@ + Date: Mon, 7 May 2018 22:05:24 -0500 Subject: [PATCH 2/3] Update PhpRedisConnection and PredisConnection to implement the new Connection contract Signed-off-by: Hunter Skrasek --- src/Illuminate/Redis/Connections/PhpRedisConnection.php | 3 ++- src/Illuminate/Redis/Connections/PredisConnection.php | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Illuminate/Redis/Connections/PhpRedisConnection.php b/src/Illuminate/Redis/Connections/PhpRedisConnection.php index 252532fac8fe..1d58e81bfe7e 100644 --- a/src/Illuminate/Redis/Connections/PhpRedisConnection.php +++ b/src/Illuminate/Redis/Connections/PhpRedisConnection.php @@ -4,11 +4,12 @@ use Redis; use Closure; +use Illuminate\Contracts\Redis\Connections\Connection as ConnectionContract; /** * @mixin \Redis */ -class PhpRedisConnection extends Connection +class PhpRedisConnection extends Connection implements ConnectionContract { /** * Create a new PhpRedis connection. diff --git a/src/Illuminate/Redis/Connections/PredisConnection.php b/src/Illuminate/Redis/Connections/PredisConnection.php index 0dbc2c5895a4..b5f4e641eea1 100644 --- a/src/Illuminate/Redis/Connections/PredisConnection.php +++ b/src/Illuminate/Redis/Connections/PredisConnection.php @@ -3,11 +3,12 @@ namespace Illuminate\Redis\Connections; use Closure; +use Illuminate\Contracts\Redis\Connections\Connection as ConnectionContract; /** * @mixin \Predis\Client */ -class PredisConnection extends Connection +class PredisConnection extends Connection implements ConnectionContract { /** * Create a new Predis connection. From 06abbde84c4e1c0e064213363dbd81ac42e703c9 Mon Sep 17 00:00:00 2001 From: Hunter Skrasek Date: Mon, 7 May 2018 22:11:14 -0500 Subject: [PATCH 3/3] StyleCI adjustment Signed-off-by: Hunter Skrasek --- src/Illuminate/Contracts/Redis/Connections/Connection.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Illuminate/Contracts/Redis/Connections/Connection.php b/src/Illuminate/Contracts/Redis/Connections/Connection.php index 13f1db84e059..537cf9d63a2b 100644 --- a/src/Illuminate/Contracts/Redis/Connections/Connection.php +++ b/src/Illuminate/Contracts/Redis/Connections/Connection.php @@ -32,4 +32,4 @@ public function psubscribe($channels, Closure $callback); * @return mixed */ public function command($method, array $parameters = []); -} \ No newline at end of file +}