From: C. Scott Ananian Date: Wed, 26 Sep 2018 17:22:38 +0000 (-0400) Subject: Hard deprecate OutputPage::addWikiText*Tidy() methods X-Git-Tag: 1.34.0-rc.0~3832^2 X-Git-Url: http://git.cyclocoop.org/%27%40script%40/ecrire/url?a=commitdiff_plain;h=2837fe85569f878fab5648ed51cf549ead9adbdd;p=lhc%2Fweb%2Fwiklou.git Hard deprecate OutputPage::addWikiText*Tidy() methods These have been replaced with OutputPage::addWikiTextAsContent(). There is only one apparent use outside core, in the ProofreadPage extension. Bug: T198214 Depends-On: I826e463c1623481c11156a55a5b7e1da0aa27b8b Change-Id: I4b1a9429029bfbbf70b2d5da1b290319ecbbdf3a --- diff --git a/includes/OutputPage.php b/includes/OutputPage.php index f2b343ec0e..b1874b9106 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -1840,6 +1840,7 @@ class OutputPage extends ContextSource { * addWikiTextAsContent() */ function addWikiTextTitleTidy( $text, Title $title, $linestart = true ) { + wfDeprecated( __METHOD__, '1.32' ); $this->addWikiTextTitleInternal( $text, $title, $linestart, /*tidy*/true, /*interface*/false ); } @@ -1852,6 +1853,7 @@ class OutputPage extends ContextSource { * addWikiTextAsContent() */ public function addWikiTextTidy( $text, $linestart = true ) { + wfDeprecated( __METHOD__, '1.32' ); $title = $this->getTitle(); if ( !$title ) { throw new MWException( 'Title is null' ); diff --git a/tests/phpunit/includes/OutputPageTest.php b/tests/phpunit/includes/OutputPageTest.php index 8a4b5c3f1d..74c17367a3 100644 --- a/tests/phpunit/includes/OutputPageTest.php +++ b/tests/phpunit/includes/OutputPageTest.php @@ -1406,6 +1406,8 @@ class OutputPageTest extends MediaWikiTestCase { $this->hideDeprecated( 'OutputPage::addWikiTextTitle' ); $this->hideDeprecated( 'OutputPage::addWikiTextWithTitle' ); + $this->hideDeprecated( 'OutputPage::addWikiTextTidy' ); + $this->hideDeprecated( 'OutputPage::addWikiTextTitleTidy' ); if ( in_array( $method, [ 'addWikiTextWithTitle', 'addWikiTextTitleTidy', 'addWikiTextTitle' ]