StubUserLang was meant to avoid the cost of looking up the user preferences on requests which don't need it. There's no point in using it if you are going to unconditionally call a method on the resulting object. StubUserLang proxies to RequestContext::getLanguage() via __call(), which has a cost. Originally this cost was avoided on subsequent calls by overwriting $wgLang, but this mechanism is not effective if you retain a reference to the StubUserLang. Removing the potential for Title::getPageLanguage() to return StubUserLang simplifies the type declarations for methods that call it. Bug: T160814 Change-Id: I12ad75c2496ca727580aac55e860178d15febb6e |
||
|---|---|---|
| .. | ||
| Hook | ||
| DifferenceEngine.php | ||
| DifferenceEngineSlotDiffRenderer.php | ||
| IncompatibleDiffTypesException.php | ||
| SlotDiffRenderer.php | ||
| TextSlotDiffRenderer.php | ||
| UnsupportedSlotDiffRenderer.php | ||