Hard deprecate OutputPage::addWikiText*Tidy() methods
authorC. Scott Ananian <cscott@cscott.net>
Wed, 26 Sep 2018 17:22:38 +0000 (13:22 -0400)
committerC. Scott Ananian <cscott@cscott.net>
Wed, 10 Oct 2018 18:54:27 +0000 (14:54 -0400)
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
tests/phpunit/includes/OutputPageTest.php

index f2b343e..b1874b9 100644 (file)
@@ -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' );
index 8a4b5c3..74c1736 100644 (file)
@@ -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' ]