From: Aryeh Gregor Date: Mon, 30 Jul 2018 14:57:53 +0000 (+0300) Subject: Hard-deprecate MagicWord static methods X-Git-Tag: 1.34.0-rc.0~2088^2 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_ecrire%28%22auteur_infos%22%2C%20%22id_auteur=%24id%22%29%20.%20%22?a=commitdiff_plain;h=07628545608ec742dd21fd83f47b1552b898d3b4;p=lhc%2Fweb%2Fwiklou.git Hard-deprecate MagicWord static methods Bug: T200247 Change-Id: Ib36e78274f42ddbeaa7801cc8bad77b991a4a1aa --- diff --git a/includes/MagicWord.php b/includes/MagicWord.php index 4420d1d327..3c77234336 100644 --- a/includes/MagicWord.php +++ b/includes/MagicWord.php @@ -125,6 +125,7 @@ class MagicWord { * @deprecated since 1.32, use MagicWordFactory::get */ public static function get( $id ) { + wfDeprecated( __METHOD__, '1.32' ); return MediaWikiServices::getInstance()->getMagicWordFactory()->get( $id ); } @@ -135,6 +136,7 @@ class MagicWord { * @deprecated since 1.32, use MagicWordFactory::getVariableIDs */ public static function getVariableIDs() { + wfDeprecated( __METHOD__, '1.32' ); return MediaWikiServices::getInstance()->getMagicWordFactory()->getVariableIDs(); } @@ -144,6 +146,7 @@ class MagicWord { * @deprecated since 1.32, use MagicWordFactory::getSubstIDs */ public static function getSubstIDs() { + wfDeprecated( __METHOD__, '1.32' ); return MediaWikiServices::getInstance()->getMagicWordFactory()->getSubstIDs(); } @@ -155,6 +158,7 @@ class MagicWord { * @deprecated since 1.32, use MagicWordFactory::getCacheTTL */ public static function getCacheTTL( $id ) { + wfDeprecated( __METHOD__, '1.32' ); return MediaWikiServices::getInstance()->getMagicWordFactory()->getCacheTTL( $id ); } @@ -165,6 +169,7 @@ class MagicWord { * @deprecated since 1.32, use MagicWordFactory::getDoubleUnderscoreArray */ public static function getDoubleUnderscoreArray() { + wfDeprecated( __METHOD__, '1.32' ); return MediaWikiServices::getInstance()->getMagicWordFactory()->getDoubleUnderscoreArray(); } diff --git a/tests/phpunit/includes/api/ApiQuerySiteinfoTest.php b/tests/phpunit/includes/api/ApiQuerySiteinfoTest.php index d3a4ed4406..55f4a330ce 100644 --- a/tests/phpunit/includes/api/ApiQuerySiteinfoTest.php +++ b/tests/phpunit/includes/api/ApiQuerySiteinfoTest.php @@ -590,7 +590,10 @@ class ApiQuerySiteinfoTest extends ApiTestCase { } public function testVariables() { - $this->assertSame( MagicWord::getVariableIDs(), $this->doQuery( 'variables' ) ); + $this->assertSame( + MediaWikiServices::getInstance()->getMagicWordFactory()->getVariableIDs(), + $this->doQuery( 'variables' ) + ); } public function testProtocols() {