From 71badb429e6601ceb023adac896290498fdea921 Mon Sep 17 00:00:00 2001 From: Reedy Date: Fri, 21 Sep 2018 02:24:43 +0100 Subject: [PATCH] Remove global namespaced LBFactory Change-Id: Ia87aa5c9426af83627a1bbc9bd914546c89c1e47 --- RELEASE-NOTES-1.32 | 2 ++ autoload.php | 1 - includes/libs/rdbms/lbfactory/LBFactory.php | 5 ----- tests/phpunit/includes/db/LBFactoryTest.php | 7 ++++--- 4 files changed, 6 insertions(+), 9 deletions(-) diff --git a/RELEASE-NOTES-1.32 b/RELEASE-NOTES-1.32 index 16eec55058..32ef63c673 100644 --- a/RELEASE-NOTES-1.32 +++ b/RELEASE-NOTES-1.32 @@ -314,6 +314,8 @@ because of Phabricator reports. * $wgSpecialPages no longer accepts array syntax, deprecated since 1.18. * The MailAddress constructor can no longer be called with a User object, behaviour which has been deprecated since 1.24. +* LBFactory, deprecated since 1.28, has been removed. Instead, use + Wikimedia\Rdbms\LBFactory. === Deprecations in 1.32 === * HTMLForm::setSubmitProgressive() is deprecated. No need to call it. Submit diff --git a/autoload.php b/autoload.php index 67285d0a89..96a7dc3036 100644 --- a/autoload.php +++ b/autoload.php @@ -717,7 +717,6 @@ $wgAutoloadLocalClasses = [ 'JsonContentHandler' => __DIR__ . '/includes/content/JsonContentHandler.php', 'KkConverter' => __DIR__ . '/languages/classes/LanguageKk.php', 'KuConverter' => __DIR__ . '/languages/classes/LanguageKu.php', - 'LBFactory' => __DIR__ . '/includes/libs/rdbms/lbfactory/LBFactory.php', 'LCStore' => __DIR__ . '/includes/cache/localisation/LCStore.php', 'LCStoreCDB' => __DIR__ . '/includes/cache/localisation/LCStoreCDB.php', 'LCStoreDB' => __DIR__ . '/includes/cache/localisation/LCStoreDB.php', diff --git a/includes/libs/rdbms/lbfactory/LBFactory.php b/includes/libs/rdbms/lbfactory/LBFactory.php index e736ab9cc7..1612f41dca 100644 --- a/includes/libs/rdbms/lbfactory/LBFactory.php +++ b/includes/libs/rdbms/lbfactory/LBFactory.php @@ -728,8 +728,3 @@ abstract class LBFactory implements ILBFactory { $this->destroy(); } } - -/** - * @deprecated since 1.29 - */ -class_alias( LBFactory::class, 'LBFactory' ); diff --git a/tests/phpunit/includes/db/LBFactoryTest.php b/tests/phpunit/includes/db/LBFactoryTest.php index a0bc038f38..1616139a0f 100644 --- a/tests/phpunit/includes/db/LBFactoryTest.php +++ b/tests/phpunit/includes/db/LBFactoryTest.php @@ -34,13 +34,14 @@ use Wikimedia\Rdbms\DatabaseDomain; /** * @group Database + * @covers \Wikimedia\Rdbms\LBFactory * @covers \Wikimedia\Rdbms\LBFactorySimple * @covers \Wikimedia\Rdbms\LBFactoryMulti */ class LBFactoryTest extends MediaWikiTestCase { /** - * @covers MWLBFactory::getLBFactoryClass + * @covers MWLBFactory::getLBFactoryClass() * @dataProvider getLBFactoryClassProvider */ public function testGetLBFactoryClass( $expected, $deprecated ) { @@ -76,8 +77,8 @@ class LBFactoryTest extends MediaWikiTestCase { } /** - * @covers LBFactory::getLocalDomainID() - * @covers LBFactory::resolveDomainID() + * @covers \Wikimedia\Rdbms\LBFactory::getLocalDomainID() + * @covers \Wikimedia\Rdbms\LBFactory::resolveDomainID() */ public function testLBFactorySimpleServer() { global $wgDBserver, $wgDBname, $wgDBuser, $wgDBpassword, $wgDBtype, $wgSQLiteDataDir; -- 2.20.1