Merge "Hard deprecate OutputPage::parse() and OutputPage::parseInline()"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Mon, 5 Nov 2018 18:07:29 +0000 (18:07 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Mon, 5 Nov 2018 18:07:29 +0000 (18:07 +0000)
1  2 
includes/OutputPage.php

diff --combined includes/OutputPage.php
@@@ -2093,11 -2093,12 +2093,12 @@@ class OutputPage extends ContextSource 
         * @param Language|null $language Target language object, will override $interface
         * @throws MWException
         * @return string HTML
 -       * @deprecated since 1.33, due to untidy output and inconsistent wrapper;
 +       * @deprecated since 1.32, due to untidy output and inconsistent wrapper;
         *  use parseAsContent() if $interface is default value or false, or else
         *  parseAsInterface() if $interface is true.
         */
        public function parse( $text, $linestart = true, $interface = false, $language = null ) {
+               wfDeprecated( __METHOD__, '1.33' );
                return $this->parseInternal(
                        $text, $this->getTitle(), $linestart, /*tidy*/false, $interface, $language
                )->getText( [
         * @param bool $linestart Is this the start of a line? (Defaults to true)
         * @throws MWException
         * @return string HTML
 -       * @since 1.33
 +       * @since 1.32
         */
        public function parseAsContent( $text, $linestart = true ) {
                return $this->parseInternal(
         * @param bool $linestart Is this the start of a line? (Defaults to true)
         * @throws MWException
         * @return string HTML
 -       * @since 1.33
 +       * @since 1.32
         */
        public function parseAsInterface( $text, $linestart = true ) {
                return $this->parseInternal(
         * @param bool $linestart Is this the start of a line? (Defaults to true)
         * @throws MWException
         * @return string HTML
 -       * @since 1.33
 +       * @since 1.32
         */
        public function parseInlineAsInterface( $text, $linestart = true ) {
                return Parser::stripOuterParagraph(
         * @param bool $interface Use interface language (instead of content language) while parsing
         *   language sensitive magic words like GRAMMAR and PLURAL
         * @return string HTML
 -       * @deprecated since 1.33, due to untidy output and confusing default
 +       * @deprecated since 1.32, due to untidy output and confusing default
         *   for $interface.  Use parseInlineAsInterface() if $interface is
         *   the default value or false, or else use
         *   Parser::stripOuterParagraph($outputPage->parseAsContent(...)).
         */
        public function parseInline( $text, $linestart = true, $interface = false ) {
+               wfDeprecated( __METHOD__, '1.33' );
                $parsed = $this->parseInternal(
                        $text, $this->getTitle(), $linestart, /*tidy*/false, $interface, /*language*/null
                )->getText( [