Deprecate OutputPage::parse() and OutputPage::parseInline()
authorC. Scott Ananian <cscott@cscott.net>
Fri, 26 Oct 2018 15:14:01 +0000 (11:14 -0400)
committerC. Scott Ananian <cscott@cscott.net>
Mon, 29 Oct 2018 19:34:40 +0000 (15:34 -0400)
commita3f63785eebfa2f729d42da880b6722736ef1e7d
treee5145345261fc55d9e44bb36dec559b0c092b482
parentdc92754891d0333e972dd1aa74a61631eddd78df
Deprecate OutputPage::parse() and OutputPage::parseInline()

The OutputPage::parse() and OutputPage::parseInline() methods behave
misleadingly different from the OutputPage::addWikitext*() methods:
they don't tidy their output, they have different defaults for
interface/content language selection, and they (sometimes) add
wrapper divs.  Deprecate these and add new methods with tidy output,
clear language selection, and consistent defaults:
OutputPage::parseAsContent(), OutputPage::parseAsInterface(),
and OutputPage::parseInlineAsInterface().

Unify the implementation of the parse* methods with the addWikiText*
methods, to reduce the likelihood that the behavior will diverge again
in the future.

Bug: T198214
Change-Id: Ica79c2acbc542ef37f971c0be2582ae771a23bd0
RELEASE-NOTES-1.33
includes/OutputPage.php
tests/phpunit/includes/OutputPageTest.php