From: jenkins-bot Date: Wed, 10 Oct 2018 20:14:12 +0000 (+0000) Subject: Merge "Hard deprecate OutputPage::addWikiText*Tidy() methods" X-Git-Tag: 1.34.0-rc.0~3832 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/pie.php?a=commitdiff_plain;h=2821e6fcb775c1f033105746905ff92db582c041;hp=992643a9337adfd9feb7c23d3773a9e21a55898a;p=lhc%2Fweb%2Fwiklou.git Merge "Hard deprecate OutputPage::addWikiText*Tidy() methods" --- 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' ]