From: Aaron Schulz Date: Wed, 3 Jul 2019 16:51:23 +0000 (-0700) Subject: Removed deprecated WikiMap::getWikiIdFromDomain() method X-Git-Tag: 1.34.0-rc.0~1018^2 X-Git-Url: http://git.heureux-cyclage.org/?a=commitdiff_plain;h=55301a4bb6b4a89a242b7f46b9fc926398e69757;p=lhc%2Fweb%2Fwiklou.git Removed deprecated WikiMap::getWikiIdFromDomain() method Also simplify WikiMap::isCurrentWikiDbDomain() slightly Change-Id: I21358c5e5ae1d229228fc416894f50b4ee444182 --- diff --git a/RELEASE-NOTES-1.34 b/RELEASE-NOTES-1.34 index be24b50c62..8efa6608af 100644 --- a/RELEASE-NOTES-1.34 +++ b/RELEASE-NOTES-1.34 @@ -272,6 +272,8 @@ because of Phabricator reports. 0..(numRows-1). * The ChangePasswordForm hook, deprecated in 1.27, has been removed. Use the AuthChangeFormFields hook or security levels instead. +* WikiMap::getWikiIdFromDomain(), deprecated in 1.33, has been removed. + Use WikiMap::getWikiIdFromDbDomain() instead. * … === Deprecations in 1.34 === diff --git a/includes/WikiMap.php b/includes/WikiMap.php index 23b0e3edb2..f2641f40f4 100644 --- a/includes/WikiMap.php +++ b/includes/WikiMap.php @@ -286,15 +286,6 @@ class WikiMap { : (string)$domain->getDatabase(); } - /** - * @param string $domain - * @return string - * @deprecated Since 1.33; use getWikiIdFromDbDomain() - */ - public static function getWikiIdFromDomain( $domain ) { - return self::getWikiIdFromDbDomain( $domain ); - } - /** * @return DatabaseDomain Database domain of the current wiki * @since 1.33 @@ -311,7 +302,7 @@ class WikiMap { * @since 1.33 */ public static function isCurrentWikiDbDomain( $domain ) { - return self::getCurrentWikiDbDomain()->equals( DatabaseDomain::newFromId( $domain ) ); + return self::getCurrentWikiDbDomain()->equals( $domain ); } /** diff --git a/tests/phpunit/includes/WikiMapTest.php b/tests/phpunit/includes/WikiMapTest.php index 6850a24545..6fe9218b7f 100644 --- a/tests/phpunit/includes/WikiMapTest.php +++ b/tests/phpunit/includes/WikiMapTest.php @@ -236,7 +236,7 @@ class WikiMapTest extends MediaWikiLangTestCase { $this->assertEquals( $wiki, WikiMap::getWikiFromUrl( $url ) ); } - public function provideGetWikiIdFromDomain() { + public function provideGetWikiIdFromDbDomain() { return [ [ 'db-prefix_', 'db-prefix_' ], [ wfWikiID(), wfWikiID() ], @@ -249,10 +249,10 @@ class WikiMapTest extends MediaWikiLangTestCase { } /** - * @dataProvider provideGetWikiIdFromDomain + * @dataProvider provideGetWikiIdFromDbDomain * @covers WikiMap::getWikiIdFromDbDomain() */ - public function testGetWikiIdFromDomain( $domain, $wikiId ) { + public function testGetWikiIdFromDbDomain( $domain, $wikiId ) { $this->assertEquals( $wikiId, WikiMap::getWikiIdFromDbDomain( $domain ) ); }