The functions returning null or the class property is set explict null
Found by phan strict checks
Change-Id: I4a271093fb6526564d8083a08249c64cb21f2453
Many Language methods can't be typehinted with Language as long as
$wgLang/StubUserLang are not completely removed (T160814)
Lack of explicit StubUserlang in the param type often make it
possible for the typehint to be reintroduced after it was removed,
as it happened in Iec1b562 and If72d054
Change-Id: I9b3e87baf38091e2de428de0c92c5a8a6fea32ea
Sometimes the method is called with a stub language object.
There are probably better ways to avoid that in the long-term
but for now this is a risk-free fix.
Change-Id: I29574c20d2963de826108e5ad9e7e22ec6571ebe
In parserTests.php, instruct ExtensionRegistry to load test classes,
since I recently moved some TimedMediaHandler test classes from
AutoloadClasses to TestAutoloadClasses for preload support, which
broke parserTests.php.
Change-Id: Ibc620865b1ce0f3ae95340477005b977f0509a2b
Follows-up I361fde0de7f4406bce6ed075ed397effa5be3359.
Per T253461, not mass-changing source code, but the use of the native
error silencing operator (@) is especially useful in tests because:
1. It requires any/all statements to be explicitly marked. The
suppressWarnings/restoreWarnings sections encourage developers to
be "lazy" and thus encapsulate more than needed if there are multiple
ones near each other, which would ignore potentially important
warnings in a test case, which is generally exactly the time when
it is really useful to get warnings etc.
2. It avoids leaking state, for example in LBFactoryTest the
assertFalse call would throw a PHPUnit assertion error (not meant
to be caught by the local catch), and thus won't reach
AtEase::restoreWarnings. This then causes later code to end up
in a mismatching state and creates a confusing error_reporting
state.
See .phpcs.xml, where the at operator is allowed for all test code.
Change-Id: I68d1725d685e0a7586468bc9de6dc29ceea31b8a
* Don't promote use of `new mw.Message(mw.messages)` which we never
do in practice.
* Remove mention of deprecated and internal `.format` state.
* Rephrase plain(), text() etc based on what they do for the caller,
not how they work internally.
* Fix mistake in parse() which claimed to be like plain() whereas
it is actually like escaped() - when jqueryMsg is absent.
Bug: T292489
Change-Id: I91f6b5362b66eed17660b660615837a540af94cb
Message parsing used to be the biggest part of loads during
DefaultPreferencesFactory::loadPreferenceValues(), since it need to
load form fields to validate existing user preferences.
Message names in form descriptor can be unset as much as possible,
but special cases should be carefully handled.
Bug: T58633
Change-Id: I1b5c2331e6d5a63f296b4147a91aecb39abf3530
Use the object factory to inject service into TrivialLanguageConverter
class.
The other language converter classes does not use service directly.
The classes are using indirectly services in some function of
the parent class, which needs injection as well (tracked with T294185).
Needs fallback to global state in TrivialLanguageConverter, because the
class is used in extensions integration tests
Change-Id: If72d054d062a4f357e12c5b168e118bfafffd626
Fixes a bug where if a group both inherited its rights from some other
group and had rights of its own (which seems like something we should
support), that group would be listed twice on Special:ListGroupRights.
Change-Id: Ie3d93287aa256a7ed50e48a78b5996a193e9b60f
* Removes no-op UPDATE on archive table
* Only does UPDATE on revision/revision_actor_temp if there are rows to update
* Better variable names
* Make use of selectRowCount() wrapper
Change-Id: I971e0808ec27d3da432241d668f2a8313238e820