jenkins-bot has submitted this change and it was merged.

Change subject: Allow RedisConnectionPool to be used with HHVM's Redis library
......................................................................


Allow RedisConnectionPool to be used with HHVM's Redis library

As of commit 2811e9d, HHVM includes a pure-PHP Redis client library with
method-for-method compatibility with phpredis: <http://git.io/ylDAyQ>.
RedisConnectionPool appears to work well with it save for the
extension_loaded() check. Practically a freebie!

Bug: 54158
Change-Id: I3ac12293a51a45e8f6a61a35bff7a3c063e16964
---
M includes/clientpool/RedisConnectionPool.php
1 file changed, 5 insertions(+), 5 deletions(-)

Approvals:
  Aaron Schulz: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/clientpool/RedisConnectionPool.php 
b/includes/clientpool/RedisConnectionPool.php
index da4621a..ef71b18 100644
--- a/includes/clientpool/RedisConnectionPool.php
+++ b/includes/clientpool/RedisConnectionPool.php
@@ -1,6 +1,6 @@
 <?php
 /**
- * PhpRedis client connection pooling manager.
+ * Redis client connection pooling manager.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -23,7 +23,7 @@
  */
 
 /**
- * Helper class to manage redis connections using PhpRedis.
+ * Helper class to manage Redis connections.
  *
  * This can be used to get handle wrappers that free the handle when the 
wrapper
  * leaves scope. The maximum number of free handles (connections) is 
configurable.
@@ -70,9 +70,9 @@
         * @param array $options
         */
        protected function __construct( array $options ) {
-               if ( !extension_loaded( 'redis' ) ) {
-                       throw new MWException( __CLASS__ . ' requires the 
phpredis extension: ' .
-                               'https://github.com/nicolasff/phpredis' );
+               if ( !class_exists( 'Redis' ) ) {
+                       throw new MWException( __CLASS__ . ' requires a Redis 
client library. ' .
+                               'See 
https://www.mediawiki.org/wiki/Redis#Setup' );
                }
                $this->connectTimeout = $options['connectTimeout'];
                $this->persistent = $options['persistent'];

-- 
To view, visit https://gerrit.wikimedia.org/r/85003
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I3ac12293a51a45e8f6a61a35bff7a3c063e16964
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Ori.livneh <[email protected]>
Gerrit-Reviewer: Aaron Schulz <[email protected]>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to