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

Fix parsing of replies to INFO for Redis 2.4.

The new string format for INFO replies has been postponed to a future version
of Redis, so we just moved the INFO class that handles them to the development
server profile.
Daniele Alessandri 13 жил өмнө
parent
commit
f19c6335d1

+ 1 - 1
lib/Predis/Commands/ServerInfoV24x.php → lib/Predis/Commands/ServerInfoV26x.php

@@ -2,7 +2,7 @@
 
 namespace Predis\Commands;
 
-class ServerInfoV24x extends ServerInfo {
+class ServerInfoV26x extends ServerInfo {
     public function parseResponse($data) {
         $info      = array();
         $current   = null;

+ 0 - 1
lib/Predis/Profiles/ServerVersion24.php

@@ -177,7 +177,6 @@ class ServerVersion24 extends ServerProfile {
             /* ---------------- Redis 2.4 ---------------- */
 
             /* remote server control commands */
-            'info'                      => '\Predis\Commands\ServerInfoV24x',
             'client'                    => '\Predis\Commands\ServerClient',
         );
     }

+ 1 - 0
lib/Predis/Profiles/ServerVersionNext.php

@@ -6,6 +6,7 @@ class ServerVersionNext extends ServerVersion24 {
     public function getVersion() { return '2.6'; }
     public function getSupportedCommands() {
         return array_merge(parent::getSupportedCommands(), array(
+            'info'                      => '\Predis\Commands\ServerInfoV26x',
             'eval'                      => '\Predis\Commands\ServerEval',
             'evalsha'                   => '\Predis\Commands\ServerEvalSHA',
         ));