[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Remove unused LBFactoryFake class
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..000 --- a/includes/db/loadbalancer/LBFactoryFake.php +++ /dev/null @@ -1,49 +0,0 @@ -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 ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Remove unused LBFactoryFake class
jenkins-bot has submitted this change and it was merged. 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(-) Approvals: Tim Starling: Looks good to me, approved jenkins-bot: Verified 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..000 --- a/includes/db/loadbalancer/LBFactoryFake.php +++ /dev/null @@ -1,49 +0,0 @@ -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: merged Gerrit-Change-Id: I88acf72fc32c7e3c9bead81d11c5adfd8dff6151 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Aaron Schulz Gerrit-Reviewer: Parent5446 Gerrit-Reviewer: Tim Starling Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits