From 2837fe85569f878fab5648ed51cf549ead9adbdd Mon Sep 17 00:00:00 2001 From: "C. Scott Ananian" Date: Wed, 26 Sep 2018 13:22:38 -0400 Subject: [PATCH] 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 --- includes/OutputPage.php | 2 ++ tests/phpunit/includes/OutputPageTest.php | 2 ++ 2 files changed, 4 insertions(+) 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' ] -- 2.20.1