Originally we created a Parser object on every request, and so care was taken to make Parser construction lightweight. In particular, all potentially costly initialization was moved into a separate Parser::firstCallInit() method. Starting with 1.32, parser construction has instead been done lazily, via the ParserFactory registered with MediaWikiServices. The extra complexity associated with the old manual lazy initialization of Parser is therefore no longer needed. Deprecate Parser::firstCallInit() as part of a general plan to refactor the Parser class to allow subclasses and alternate parser implementations. Add some tests to assert that parsers are being created lazily, and are not being created when they are not needed. Bug: T250444 Change-Id: Iffd2b38a2f848dad88010d243250b37506b2c715 |
||
|---|---|---|
| .. | ||
| CoreParserFunctionsTest.php | ||
| MagicVariableTest.php | ||
| ParserMethodsTest.php | ||
| ParserOptionsTest.php | ||
| ParserOutputTest.php | ||
| ParserPreloadTest.php | ||
| ParserTest.php | ||
| PreprocessorTest.php | ||
| SanitizerTest.php | ||
| StripStateTest.php | ||
| TagHooksTest.php | ||