Following up on the comment I made at Ibbc1423166f4804a5122, make Parser instance management a ParserFactory responsibility. It is weird for Parser to have a ParserFactory proxy aspect. * Add ParserFactory::getMainInstance(), which is equivalent to the old MediaWikiServices::getParser() and $wgParser. * Add ParserFactory::getInstance(), which is equivalent to $wgParser->getFreshInstance(), returning the main instance if it is free, or a new instance otherwise. The naming is supposed to encourage it as the default way to get a parser, which will help with the linked bug. * Deprecate Parser::getFreshParser() and migrate all core callers. I left the entry in ServiceWiring.php so that it's not immediately necessary to migrate ObjectFactory specs that ask for Parser. Bug: T310948 Change-Id: I762b191e978c2d1bbc9f332c9cfa047888ce2e67 |
||
|---|---|---|
| .. | ||
| Hook | ||
| Parsoid | ||
| BlockLevelPass.php | ||
| CacheTime.php | ||
| CoreMagicVariables.php | ||
| CoreParserFunctions.php | ||
| CoreTagHooks.php | ||
| DateFormatter.php | ||
| DateFormatterFactory.php | ||
| LinkHolderArray.php | ||
| MWTidy.php | ||
| Parser.php | ||
| ParserCache.php | ||
| ParserCacheFactory.php | ||
| ParserCacheMetadata.php | ||
| ParserFactory.php | ||
| ParserObserver.php | ||
| ParserOptions.php | ||
| ParserOutput.php | ||
| ParserOutputFlags.php | ||
| PPCustomFrame_Hash.php | ||
| PPDPart_Hash.php | ||
| PPDStack_Hash.php | ||
| PPDStackElement_Hash.php | ||
| PPFrame.php | ||
| PPFrame_Hash.php | ||
| PPNode.php | ||
| PPNode_Hash_Array.php | ||
| PPNode_Hash_Attr.php | ||
| PPNode_Hash_Text.php | ||
| PPNode_Hash_Tree.php | ||
| PPTemplateFrame_Hash.php | ||
| Preprocessor.php | ||
| Preprocessor_Hash.php | ||
| RemexRemoveTagHandler.php | ||
| RemexStripTagHandler.php | ||
| RevisionOutputCache.php | ||
| Sanitizer.php | ||
| StripState.php | ||