Deprecate and rename OutputPage::addWikiText* methods
authorC. Scott Ananian <cscott@cscott.net>
Fri, 21 Sep 2018 16:24:57 +0000 (12:24 -0400)
committerC. Scott Ananian <cscott@cscott.net>
Wed, 10 Oct 2018 18:54:27 +0000 (14:54 -0400)
commit7af52285f735b224ee60e6565fb25364da4e318e
treead8525c4079d844f9ed7af277ff7ce3501761d8a
parent20845db7dd25b2fee5b77171a925d6f9abccecbf
Deprecate and rename OutputPage::addWikiText* methods

Tidy will always be enabled with our future parsers, and it is fast
and pure PHP now with the Remex implementation, so deprecate all the
untidy variants of 'OutputPage::addWikiText*()' and add new methods
which tidy by default.  Clarify the content language/interface
language distinction while we're at it by adding 'AsInterface' to the
name of methods which use the "interface language" by default,
and renaming the 'addWikiText*Tidy' methods to
'addWikiTextAsContent'.

The 'OutputPage::addWikiTextTitle' method has been deprecated, but it
is still used internally as the implementation for the newly-added
methods.  It is expected that the shared implementation will move in
the future to a new private method.  Setting the `$tidy` parameter of
`OutputPage::addWikiTextTitle` to false is independently deprecated;
for backwards-compatibility with old MW releases you may wish to
continue to invoke OutputPage::addWikiTextTitle() but set $tidy=true;
this will result in the same tidied output that the newly added
methods would produce.

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