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 | ||
| DefaultPreferencesFactory.php | ||
| Filter.php | ||
| IntvalFilter.php | ||
| MultiTitleFilter.php | ||
| MultiUsernameFilter.php | ||
| PreferencesFactory.php | ||
| SignatureValidator.php | ||
| SignatureValidatorFactory.php | ||
| TimezoneFilter.php | ||