Krinkle has uploaded a new change for review.
https://gerrit.wikimedia.org/r/313620
Change subject: database: Rename LBFactoryMW to MWLBFactory
......................................................................
database: Rename LBFactoryMW to MWLBFactory
It's no longer an LBFactory subclass (since 5d4b009cf), and the MW-prefix
seems more natural for this class.
The class has only existed since for about 2 weeks (since 0e5cd18b7) and
is not used outside MediaWiki core across Wikimedia Git.
Change-Id: I34be982b5d10ad03e062033da9c40b4a01665289
---
M autoload.php
M includes/ServiceWiring.php
R includes/db/MWLBFactory.php
M tests/phpunit/includes/db/LBFactoryTest.php
4 files changed, 6 insertions(+), 6 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/20/313620/1
diff --git a/autoload.php b/autoload.php
index 5b99fac..323a01d 100644
--- a/autoload.php
+++ b/autoload.php
@@ -663,7 +663,6 @@
'KkConverter' => __DIR__ . '/languages/classes/LanguageKk.php',
'KuConverter' => __DIR__ . '/languages/classes/LanguageKu.php',
'LBFactory' => __DIR__ . '/includes/libs/rdbms/lbfactory/LBFactory.php',
- 'LBFactoryMW' => __DIR__ . '/includes/db/loadbalancer/LBFactoryMW.php',
'LBFactoryMulti' => __DIR__ .
'/includes/libs/rdbms/lbfactory/LBFactoryMulti.php',
'LBFactorySimple' => __DIR__ .
'/includes/libs/rdbms/lbfactory/LBFactorySimple.php',
'LBFactorySingle' => __DIR__ .
'/includes/libs/rdbms/lbfactory/LBFactorySingle.php',
@@ -781,6 +780,7 @@
'MWFileProps' => __DIR__ . '/includes/utils/MWFileProps.php',
'MWGrants' => __DIR__ . '/includes/utils/MWGrants.php',
'MWHttpRequest' => __DIR__ . '/includes/HttpFunctions.php',
+ 'MWLBFactory' => __DIR__ . '/includes/db/MWLBFactory.php',
'MWMemcached' => __DIR__ . '/includes/compat/MemcachedClientCompat.php',
'MWMessagePack' => __DIR__ . '/includes/libs/MWMessagePack.php',
'MWNamespace' => __DIR__ . '/includes/MWNamespace.php',
diff --git a/includes/ServiceWiring.php b/includes/ServiceWiring.php
index 6044911..11ee616 100644
--- a/includes/ServiceWiring.php
+++ b/includes/ServiceWiring.php
@@ -45,11 +45,11 @@
'DBLoadBalancerFactory' => function( MediaWikiServices $services ) {
$mainConfig = $services->getMainConfig();
- $lbConf = LBFactoryMW::applyDefaultConfig(
+ $lbConf = MWLBFactory::applyDefaultConfig(
$mainConfig->get( 'LBFactoryConf' ),
$mainConfig
);
- $class = LBFactoryMW::getLBFactoryClass( $lbConf );
+ $class = MWLBFactory::getLBFactoryClass( $lbConf );
return new $class( $lbConf );
},
diff --git a/includes/db/loadbalancer/LBFactoryMW.php
b/includes/db/MWLBFactory.php
similarity index 97%
rename from includes/db/loadbalancer/LBFactoryMW.php
rename to includes/db/MWLBFactory.php
index 9821da1..96c6e9f 100644
--- a/includes/db/loadbalancer/LBFactoryMW.php
+++ b/includes/db/MWLBFactory.php
@@ -24,10 +24,10 @@
use MediaWiki\Logger\LoggerFactory;
/**
- * Legacy MediaWiki-specific class for generating database load balancers
+ * MediaWiki-specific class for generating database load balancers
* @ingroup Database
*/
-abstract class LBFactoryMW {
+abstract class MWLBFactory {
/**
* @param array $lbConf Config for LBFactory::__construct()
* @param Config $mainConfig Main config object from MediaWikiServices
diff --git a/tests/phpunit/includes/db/LBFactoryTest.php
b/tests/phpunit/includes/db/LBFactoryTest.php
index 0f4484e..aed2d83 100644
--- a/tests/phpunit/includes/db/LBFactoryTest.php
+++ b/tests/phpunit/includes/db/LBFactoryTest.php
@@ -43,7 +43,7 @@
];
$this->hideDeprecated( '$wgLBFactoryConf must be updated. See
RELEASE-NOTES for details' );
- $result = LBFactoryMW::getLBFactoryClass( $config );
+ $result = MWLBFactory::getLBFactoryClass( $config );
$this->assertEquals( $expected, $result );
}
--
To view, visit https://gerrit.wikimedia.org/r/313620
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I34be982b5d10ad03e062033da9c40b4a01665289
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Krinkle <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits