Merge "Hard deprecate $wgParser"
This commit is contained in:
commit
e2d7f9b490
4 changed files with 8 additions and 4 deletions
|
|
@ -958,6 +958,9 @@ because of Phabricator reports.
|
|||
* Version 1 of the parserTests file format has been deprecated. Update
|
||||
your parser tests to version 2, which uses Remex tidy on all test output
|
||||
by default.
|
||||
* $wgParser — This global variable, soft deprecated in 1.32, has now been hard
|
||||
deprecated. Use MediaWikiServices::getInstance()->getParser() instead.
|
||||
(T160811)
|
||||
* LinksUpdate::getRevision and ::setRevision are hard deprecated in favor
|
||||
of the new ::getRevisionRecord and ::setRevisionRecord methods.
|
||||
* Article::getRevision and WikiPage::getRevision were hard deprecated
|
||||
|
|
|
|||
|
|
@ -56,7 +56,8 @@ $wgContLang
|
|||
Language object associated with the wiki being viewed.
|
||||
|
||||
$wgParser
|
||||
Parser object. Parser extensions register their hooks here.
|
||||
Parser object. Parser extensions used to register their hooks here;
|
||||
modern code should use the ParserFirstCallInit hook.
|
||||
|
||||
$wgRequest
|
||||
WebRequest object, to get request data
|
||||
|
|
|
|||
|
|
@ -2613,7 +2613,7 @@ $rev: Revision object of the template
|
|||
&$deps: Array of template dependencies with 'title', 'page_id', 'rev_id' keys
|
||||
|
||||
'ParserFirstCallInit': Called when the parser initialises for the first time.
|
||||
[&]$parser: Parser object being cleared
|
||||
[&]$parser: Parser object being initialised
|
||||
|
||||
'ParserGetVariableValueSwitch': Called when the parser needs the value of a
|
||||
custom magic word
|
||||
|
|
|
|||
|
|
@ -794,9 +794,9 @@ $wgOut = RequestContext::getMain()->getOutput(); // BackCompat
|
|||
* @var Parser $wgParser
|
||||
* @deprecated since 1.32, use MediaWikiServices::getInstance()->getParser() instead
|
||||
*/
|
||||
$wgParser = new StubObject( 'wgParser', function () {
|
||||
$wgParser = new DeprecatedGlobal( 'wgParser', function () {
|
||||
return MediaWikiServices::getInstance()->getParser();
|
||||
} );
|
||||
}, '1.32' );
|
||||
|
||||
/**
|
||||
* @var Title $wgTitle
|
||||
|
|
|
|||
Loading…
Reference in a new issue