diff options
author | jenkins-bot <jenkins-bot@gerrit.wikimedia.org> | 2022-01-11 18:47:10 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@wikimedia.org> | 2022-01-11 18:47:10 +0000 |
commit | 5d23bca5a556246be82e921a4b9895e7e519064a (patch) | |
tree | d9d5e7047f60991436ab0fc5b2a3bd61be75bf3b | |
parent | 1f8fb9b7f769c789c16baabe2754633e38d3bc83 (diff) | |
parent | 01b0e099a84574c66d026522144823f78fb88d26 (diff) | |
download | mediawikicore-5d23bca5a556246be82e921a4b9895e7e519064a.tar.gz mediawikicore-5d23bca5a556246be82e921a4b9895e7e519064a.zip |
Merge "Hard deprecate the global function wfWikiID()"
-rw-r--r-- | RELEASE-NOTES-1.38 | 2 | ||||
-rw-r--r-- | docs/Logger.md | 2 | ||||
-rw-r--r-- | includes/GlobalFunctions.php | 4 | ||||
-rw-r--r-- | tests/phpunit/includes/GlobalFunctions/GlobalTest.php | 6 |
4 files changed, 11 insertions, 3 deletions
diff --git a/RELEASE-NOTES-1.38 b/RELEASE-NOTES-1.38 index 1cfbe1ed2525..458df0865e8e 100644 --- a/RELEASE-NOTES-1.38 +++ b/RELEASE-NOTES-1.38 @@ -410,6 +410,8 @@ generic `mediawiki.pager.styles`. * ApiStashEdit::parseAndStash has been hard deprecated. * Content::prepareSave was hard-deprecated, now emits deprecation warnings. Use ContentHandler::validateSave instead. +* The global function wfWikiID(), deprecated since 1.35, now emits + deprecation warnings. * The `button` parameter for `bindUpdateAriaExpandedOnInput` and `updateAriaExpanded` in checkboxHack.js have been deprecated. `bindToggleOnSpaceEnter` has also been deprecated in favor of diff --git a/docs/Logger.md b/docs/Logger.md index 65205d706098..1dedc2bd5338 100644 --- a/docs/Logger.md +++ b/docs/Logger.md @@ -55,7 +55,7 @@ provided by the class describes a more feature rich logging configuration. * MediaWiki.Logger.Monolog.LegacyHandler: Monolog handler that replicates the udp2log and file logging functionality of wfErrorLog() * MediaWiki.Logger.Monolog.WikiProcessor: Monolog log processor that adds host: - wfHostname() and wiki: wfWikiID() to all records + wfHostname() and wiki: WikiMap::getCurrentWikiId() to all records # Globals * $wgMWLoggerDefaultSpi: Specification for creating the default service provider diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index f3be87e55cde..2c175606b021 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -2137,10 +2137,12 @@ function wfRelativePath( $path, $from ) { * Get an ASCII string identifying this wiki * This is used as a prefix in memcached keys * - * @deprecated since 1.35 Use WikiMap::getCurrentWikiId() + * @deprecated since 1.35, hard deprecated since 1.38 + * Use WikiMap::getCurrentWikiId() instead * @return string */ function wfWikiID() { + wfDeprecated( __FUNCTION__, '1.35' ); global $wgDBprefix, $wgDBname; if ( $wgDBprefix ) { diff --git a/tests/phpunit/includes/GlobalFunctions/GlobalTest.php b/tests/phpunit/includes/GlobalFunctions/GlobalTest.php index 4a08613a1286..d2738debaac2 100644 --- a/tests/phpunit/includes/GlobalFunctions/GlobalTest.php +++ b/tests/phpunit/includes/GlobalFunctions/GlobalTest.php @@ -583,7 +583,11 @@ class GlobalTest extends MediaWikiIntegrationTestCase { $this->assertEquals( $expected, $actual, $description ); } - public function wfWikiID() { + /** + * @covers ::wfWikiID + */ + public function testWfWikiID() { + $this->hideDeprecated( 'wfWikiID' ); $this->setMwGlobals( [ 'wgDBname' => 'example', 'wgDBprefix' => '', |