From: withoutaname Date: Mon, 23 Jun 2014 23:13:32 +0000 (-0700) Subject: Add deprecation messages to static methods in Article.php X-Git-Tag: 1.31.0-rc.0~15257^2 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/Boston?a=commitdiff_plain;h=34b98c7b2c4d79da02da70886da32d3a5a5344a6;p=lhc%2Fweb%2Fwiklou.git Add deprecation messages to static methods in Article.php The referenced hooks simply call the corresponding hooks in WikiPage.php, so it would be better to call them from WikiPage.php directly. Change-Id: Ia0cf526c625d38cd941a1166876c13697be87a86 --- diff --git a/includes/page/Article.php b/includes/page/Article.php index c68c675dc9..394c50d5bf 100644 --- a/includes/page/Article.php +++ b/includes/page/Article.php @@ -2060,29 +2060,41 @@ class Article implements Page { /** * @return array + * + * @deprecated since 1.24, use WikiPage::selectFields() instead */ public static function selectFields() { + wfDeprecated( __METHOD__, '1.24' ); return WikiPage::selectFields(); } /** * @param Title $title + * + * @deprecated since 1.24, use WikiPage::onArticleCreate() instead */ public static function onArticleCreate( $title ) { + wfDeprecated( __METHOD__, '1.24' ); WikiPage::onArticleCreate( $title ); } /** * @param Title $title + * + * @deprecated since 1.24, use WikiPage::onArticleDelete() instead */ public static function onArticleDelete( $title ) { + wfDeprecated( __METHOD__, '1.24' ); WikiPage::onArticleDelete( $title ); } /** * @param Title $title + * + * @deprecated since 1.24, use WikiPage::onArticleEdit() instead */ public static function onArticleEdit( $title ) { + wfDeprecated( __METHOD__, '1.24' ); WikiPage::onArticleEdit( $title ); } diff --git a/tests/phpunit/includes/ArticleTest.php b/tests/phpunit/includes/ArticleTest.php index b07c0136aa..ae069eaf42 100644 --- a/tests/phpunit/includes/ArticleTest.php +++ b/tests/phpunit/includes/ArticleTest.php @@ -76,6 +76,7 @@ class ArticleTest extends MediaWikiTestCase { * @covers Article::getAutosummary */ public function testStaticFunctions() { + $this->hideDeprecated( 'Article::selectFields' ); $this->hideDeprecated( 'Article::getAutosummary' ); $this->hideDeprecated( 'WikiPage::getAutosummary' ); $this->hideDeprecated( 'CategoryPage::getAutosummary' ); // Inherited from Article