Aaron Schulz has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/310731

Change subject: Remove unused LBFactoryFake class
......................................................................

Remove unused LBFactoryFake class

Change-Id: I88acf72fc32c7e3c9bead81d11c5adfd8dff6151
---
M autoload.php
M includes/db/loadbalancer/LBFactory.php
D includes/db/loadbalancer/LBFactoryFake.php
M tests/phpunit/includes/db/LBFactoryTest.php
4 files changed, 0 insertions(+), 52 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/31/310731/1

diff --git a/autoload.php b/autoload.php
index 1ebf728..d46d2ce 100644
--- a/autoload.php
+++ b/autoload.php
@@ -654,7 +654,6 @@
        'KkConverter' => __DIR__ . '/languages/classes/LanguageKk.php',
        'KuConverter' => __DIR__ . '/languages/classes/LanguageKu.php',
        'LBFactory' => __DIR__ . '/includes/db/loadbalancer/LBFactory.php',
-       'LBFactoryFake' => __DIR__ . 
'/includes/db/loadbalancer/LBFactoryFake.php',
        'LBFactoryMulti' => __DIR__ . 
'/includes/db/loadbalancer/LBFactoryMulti.php',
        'LBFactorySimple' => __DIR__ . 
'/includes/db/loadbalancer/LBFactorySimple.php',
        'LBFactorySingle' => __DIR__ . 
'/includes/db/loadbalancer/LBFactorySingle.php',
diff --git a/includes/db/loadbalancer/LBFactory.php 
b/includes/db/loadbalancer/LBFactory.php
index 9eda742..6fd1550 100644
--- a/includes/db/loadbalancer/LBFactory.php
+++ b/includes/db/loadbalancer/LBFactory.php
@@ -138,7 +138,6 @@
                        'LBFactory_Simple' => 'LBFactorySimple',
                        'LBFactory_Single' => 'LBFactorySingle',
                        'LBFactory_Multi' => 'LBFactoryMulti',
-                       'LBFactory_Fake' => 'LBFactoryFake',
                ];
 
                $class = $config['class'];
diff --git a/includes/db/loadbalancer/LBFactoryFake.php 
b/includes/db/loadbalancer/LBFactoryFake.php
deleted file mode 100644
index 5cd1d4b..0000000
--- a/includes/db/loadbalancer/LBFactoryFake.php
+++ /dev/null
@@ -1,49 +0,0 @@
-<?php
-/**
- * Generator of database load balancing objects.
- *
- * 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
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- * @file
- * @ingroup Database
- */
-
-/**
- * LBFactory class that throws an error on any attempt to use it.
- * This will typically be done via wfGetDB().
- * Call LBFactory::disableBackend() to start using this, and
- * LBFactory::enableBackend() to return to normal behavior
- */
-class LBFactoryFake extends LBFactory {
-       public function newMainLB( $wiki = false ) {
-               throw new DBAccessError;
-       }
-
-       public function getMainLB( $wiki = false ) {
-               throw new DBAccessError;
-       }
-
-       protected function newExternalLB( $cluster, $wiki = false ) {
-               throw new DBAccessError;
-       }
-
-       public function getExternalLB( $cluster, $wiki = false ) {
-               throw new DBAccessError;
-       }
-
-       public function forEachLB( $callback, array $params = [] ) {
-       }
-}
diff --git a/tests/phpunit/includes/db/LBFactoryTest.php 
b/tests/phpunit/includes/db/LBFactoryTest.php
index 862ec42..364a6c2 100644
--- a/tests/phpunit/includes/db/LBFactoryTest.php
+++ b/tests/phpunit/includes/db/LBFactoryTest.php
@@ -54,7 +54,6 @@
                        [ 'LBFactorySimple', 'LBFactory_Simple' ],
                        [ 'LBFactorySingle', 'LBFactory_Single' ],
                        [ 'LBFactoryMulti', 'LBFactory_Multi' ],
-                       [ 'LBFactoryFake', 'LBFactory_Fake' ],
                ];
        }
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I88acf72fc32c7e3c9bead81d11c5adfd8dff6151
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz <asch...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to