Ver Fonte

The default server profile for Predis\Client is now 2.0 (supports for Redis v2.0 out of the box).

Daniele Alessandri há 15 anos atrás
pai
commit
f7bdd9d64b
1 ficheiros alterados com 8 adições e 3 exclusões
  1. 8 3
      lib/Predis.php

+ 8 - 3
lib/Predis.php

@@ -1198,7 +1198,8 @@ abstract class RedisServerProfile {
     private static function predisServerProfiles() {
     private static function predisServerProfiles() {
         return array(
         return array(
             '1.2'     => '\Predis\RedisServer_v1_2',
             '1.2'     => '\Predis\RedisServer_v1_2',
-            'default' => '\Predis\RedisServer_v1_2',
+            '2.0'     => '\Predis\RedisServer_v2_0',
+            'default' => '\Predis\RedisServer_v2_0',
             'dev'     => '\Predis\RedisServer_vNext',
             'dev'     => '\Predis\RedisServer_vNext',
         );
         );
     }
     }
@@ -1447,8 +1448,8 @@ class RedisServer_v1_2 extends RedisServerProfile {
     }
     }
 }
 }
 
 
-class RedisServer_vNext extends RedisServer_v1_2 {
-    public function getVersion() { return '1.3'; }
+class RedisServer_v2_0 extends RedisServer_v1_2 {
+    public function getVersion() { return '2.0'; }
     public function getSupportedCommands() {
     public function getSupportedCommands() {
         return array_merge(parent::getSupportedCommands(), array(
         return array_merge(parent::getSupportedCommands(), array(
             /* transactions */
             /* transactions */
@@ -1522,6 +1523,10 @@ class RedisServer_vNext extends RedisServer_v1_2 {
     }
     }
 }
 }
 
 
+class RedisServer_vNext extends RedisServer_v2_0 {
+    public function getVersion() { return '2.1'; }
+}
+
 /* ------------------------------------------------------------------------- */
 /* ------------------------------------------------------------------------- */
 
 
 namespace Predis\Utilities;
 namespace Predis\Utilities;