$wgParser is being removed and replaced with MediaWikiServices::getParser(). This needs to be updated. Codesearch
Description
Details
Subject | Repo | Branch | Lines +/- | |
---|---|---|---|---|
Replace $wgParser with MediaWikiServices | mediawiki/extensions/NukeDPL | master | +8 -12 |
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Open | None | T11968 Reduce use of global and public variables | |||
Open | None | T159283 Deprecate non-configuration globals | |||
Resolved | TheSandDoctor | T160811 Deprecate and remove $wgParser | |||
Resolved | TheSandDoctor | T241563 Replace $wgParser in NukeDPL |
Event Timeline
Change 561567 had a related patch set uploaded (by TheSandDoctor; owner: TheSandDoctor):
[mediawiki/extensions/NukeDPL@master] Replace $wgParser with MediaWikiServices
Change 561567 merged by jenkins-bot:
[mediawiki/extensions/NukeDPL@master] Replace $wgParser with MediaWikiServices
@TheSandDoctor I fixed some flaws in your patch that you may want to avoid on other extensions. For example, MediaWikiServices needs to be made available with:
use MediaWiki\MediaWikiServices;
Also, some MediaWikiServices methods (such as getParser) require an object context, which means you should get a MediaWikiServices instance before calling the method, like so:
$parser = MediaWikiServices::getInstance()->getParser();
Cheers!
@Sophivorus thanks! I will make corrections to the others. I was going off of the documentation in the parent task, but shall make the patches.