From 9dc7826f2d6671356c9572b04ed342c7945a02de Mon Sep 17 00:00:00 2001 From: "C. Scott Ananian" Date: Thu, 1 Nov 2018 16:30:57 -0400 Subject: [PATCH] Update deprecations after OutputPage::parse*As*() backport to 1.32 Originally landed in 1.33 in a3f63785eebfa2f729d42da880b6722736ef1e7d. Backported to 1.32 in cff9ab4b5c26dc87137aa2c04efd5d1f31226fe8. Change-Id: I402c31b57904f6a6fd0b3a2c32a1c0a73c553254 --- RELEASE-NOTES-1.32 | 5 +++++ RELEASE-NOTES-1.33 | 5 ----- includes/OutputPage.php | 10 +++++----- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/RELEASE-NOTES-1.32 b/RELEASE-NOTES-1.32 index 2cd1222f40..438fac3ae4 100644 --- a/RELEASE-NOTES-1.32 +++ b/RELEASE-NOTES-1.32 @@ -607,6 +607,11 @@ because of Phabricator reports. OutputPage::addWikiTextAsContent() instead, which ensures the output is tidy and clarifies whether content-language specific postprocessing should be done on the text. +* OutputPage::parse() and OutputPage::parseInline() have been deprecated + due to untidy output and inconsistent handling of wrapper divs and + interface/content language defaults. Use OutputPage::parseAsContent(), + OutputPage::parseAsInterface(), or OutputPage::parseInlineAsInterface() + as appropriate. * QuickTemplate::msgHtml() and BaseTemplate::msgHtml() have been deprecated as they promote bad practises. I18n messages should always be properly escaped. diff --git a/RELEASE-NOTES-1.33 b/RELEASE-NOTES-1.33 index 9aaf4af037..0e89e695f8 100644 --- a/RELEASE-NOTES-1.33 +++ b/RELEASE-NOTES-1.33 @@ -114,11 +114,6 @@ because of Phabricator reports. applied for Arabic and Malayalam in the future. Please enable these on your local wiki (if you have them explicitly set to false) and run maintenance/cleanupTitles.php to fix any existing page titles. -* OutputPage::parse() and OutputPage::parseInline() have been deprecated - due to untidy output and inconsistent handling of wrapper divs and - interface/content language defaults. Use OutputPage::parseAsContent(), - OutputPage::parseAsInterface(), or OutputPage::parseInlineAsInterface() - as appropriate. * The LegacyHookPreAuthenticationProvider class, deprecated since its creation in 1.27 as part of the AuthManager re-write, now emits deprecation warnings. This will help identify the issue if you added it to $wgAuthManagerConfig. diff --git a/includes/OutputPage.php b/includes/OutputPage.php index aa2afe962d..4a9b542c3a 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -2093,7 +2093,7 @@ 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. */ @@ -2114,7 +2114,7 @@ class OutputPage extends ContextSource { * @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( @@ -2135,7 +2135,7 @@ class OutputPage extends ContextSource { * @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( @@ -2158,7 +2158,7 @@ class OutputPage extends ContextSource { * @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( @@ -2174,7 +2174,7 @@ class OutputPage extends ContextSource { * @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(...)). -- 2.20.1