Эх сурвалжийг харах

Move command "COMMAND" to the server profile for Redis 2.8.

This command has been backported from the "unstable" branch of Redis
to the "2.8" one, and it is available since 2.8.13.
Daniele Alessandri 11 жил өмнө
parent
commit
dedc1ba0a9

+ 3 - 0
src/Profile/RedisVersion280.php

@@ -254,6 +254,9 @@ class RedisVersion280 extends RedisProfile
             'PFADD'                     => 'Predis\Command\HyperLogLogAdd',
             'PFADD'                     => 'Predis\Command\HyperLogLogAdd',
             'PFCOUNT'                   => 'Predis\Command\HyperLogLogCount',
             'PFCOUNT'                   => 'Predis\Command\HyperLogLogCount',
             'PFMERGE'                   => 'Predis\Command\HyperLogLogMerge',
             'PFMERGE'                   => 'Predis\Command\HyperLogLogMerge',
+
+            /* remote server control commands */
+            'COMMAND'                   => 'Predis\Command\ServerCommand',
         );
         );
     }
     }
 }
 }

+ 3 - 2
src/Profile/RedisVersion300.php

@@ -255,10 +255,11 @@ class RedisVersion300 extends RedisProfile
             'PFCOUNT'                   => 'Predis\Command\HyperLogLogCount',
             'PFCOUNT'                   => 'Predis\Command\HyperLogLogCount',
             'PFMERGE'                   => 'Predis\Command\HyperLogLogMerge',
             'PFMERGE'                   => 'Predis\Command\HyperLogLogMerge',
 
 
-            /* ---------------- Redis 3.0 ---------------- */
-
             /* remote server control commands */
             /* remote server control commands */
             'COMMAND'                   => 'Predis\Command\ServerCommand',
             'COMMAND'                   => 'Predis\Command\ServerCommand',
+
+            /* ---------------- Redis 3.0 ---------------- */
+
         );
         );
     }
     }
 }
 }

+ 3 - 0
tests/Predis/Command/ServerCommandTest.php

@@ -84,6 +84,7 @@ class ServerCommandTest extends PredisCommandTestCase
 
 
     /**
     /**
      * @group connected
      * @group connected
+     * @requiresRedisVersion >= 2.8.13
      */
      */
     public function testReturnsEmptyCommandInfoOnNonExistingCommand()
     public function testReturnsEmptyCommandInfoOnNonExistingCommand()
     {
     {
@@ -95,6 +96,7 @@ class ServerCommandTest extends PredisCommandTestCase
 
 
     /**
     /**
      * @group connected
      * @group connected
+     * @requiresRedisVersion >= 2.8.13
      */
      */
     public function testReturnsCommandInfoOnExistingCommand()
     public function testReturnsCommandInfoOnExistingCommand()
     {
     {
@@ -112,6 +114,7 @@ class ServerCommandTest extends PredisCommandTestCase
 
 
     /**
     /**
      * @group connected
      * @group connected
+     * @requiresRedisVersion >= 2.8.13
      */
      */
     public function testReturnsListOfCommandInfoWithNoArguments()
     public function testReturnsListOfCommandInfoWithNoArguments()
     {
     {

+ 1 - 0
tests/Predis/Profile/RedisVersion280Test.php

@@ -185,6 +185,7 @@ class RedisVersion280Test extends PredisProfileTestCase
             144 => 'PFADD',
             144 => 'PFADD',
             145 => 'PFCOUNT',
             145 => 'PFCOUNT',
             146 => 'PFMERGE',
             146 => 'PFMERGE',
+            147 => 'COMMAND',
         );
         );
     }
     }
 }
 }