Commit graph

4 commits

Author SHA1 Message Date
James D. Forrester
8e940c4f21 Standardise all our class alias deprecation comments for ease of grepping
Change-Id: I7f85d931d3b79da23e87b4e5692b2e14be8fcaa0
2024-03-19 20:11:29 +00:00
Tim Starling
e98f23c885 message: Don't load user language when a specific language was requested
Message::setContext() called $context->getLanguage(), loading the user
options from the database, which is unnecessary if
Message::inLanguage() is called immediately afterwards.

In a ResourceLoader module, RequestContext::getLanguage() throws an
exception due to MW_NO_SESSION being defined. For example, an exception
was thrown if any HTTP client error was encountered, since log message
formatting includes a call to Message::setContext().

So defer the call to RequestContext::getLanguage() by having
Message::setContext() make a closure which later fetches the language if
necessary.

Add an integration test which previously failed.

Change-Id: I326c7e3a9492952d721fb52f1868ab9c1033e683
2024-03-04 12:03:38 +11:00
Subramanya Sastry
e55cc517da Move Parser to Mediawiki\Parser namespace
Bug: T166010
Co-Authored-By: Daimona Eaytoy <daimona.wiki@gmail.com>
Co-Authored-By: James Forrester <jforrester@wikimedia.org>
Co-Authored-By: Subramanya Sastry <ssastry@wikimedia.org>
Change-Id: I79b4e732c45095eedbaa80afa5eb7479b387ed8a
2024-02-16 09:18:38 -05:00
James D. Forrester
eeb5a740b3 Namespace Message, move to appropriate directory
Bug: T353458
Change-Id: I088cbc53fbcdb974e5b05b45a62e91709dacc024
2024-02-14 15:10:36 -05:00
Renamed from includes/language/Message.php (Browse further)