Changes:
* Do not return anything in a method that is not expected to return
something.
* Inline some previously hard to read code.
* More specific type hints, if possible.
Change-Id: I0e460899eea07d8733f638a11133adc3000f0542
Although there was no docblock on CaptchaAuthenticationRequest::__construct,
the method is supposed to get a string and an array, as that's how the
class members are documented and used. Trying to access offsets of null
resulted in PHP notices on PHP 7.4, as seen in the experimental job
for various repos.
Bug: T239726
Change-Id: Idd073ebf3d560543ec225479de060e3c198847eb
Deprecated in 1.30 and makeGlobalKey() on a BagOStuff was available
since 1.27. This extension requires 1.31 so the migration seems fine.
Change-Id: Ia7b276ee65fdf58c4fc0859563930528d44a03ca
Replacement with services made available in 1.28 and this extension
requires 1.31. So, the replacement is good.
Change-Id: Idd5dda1e7cfa34b71ffb13446eb0f9e4f113f678
Change the passing of $section to an empty string instead of false to properly comply with its type and the check in Captcha::loadText
Bug: T211848
Change-Id: I0555f7fbe246b0a4741759aee5b265b4f2cc3843
The return value of the getMessage function is intentionally a Message
object (which can have different stuff, be a RawMessage or contain
parameters. Just getting the key of the message, passing it to another
function which just creates a new message out of it, doesn't make sense
and breaks the original intention of the method.
This is now fixed by this change.
Bug: T222590
Change-Id: Id8ebba6b8239e6eee4be698680edcafad6c86cb0
The OutputPage::parse() method emits untidy output and is often used
with the wrong user interface/content language selection. Replace
with Message::parseAsBlock() which was tidied in
I0f417f75a49dfea873e9a2f44d81796a48b9f428.
Bug: T198214
Change-Id: If1f0887ccd447e725fafbfcd842866c35ebb1a7e
The replacement OutputPage::addWikiMsg() method is ancient, and so
no bump to the minimum required MW version is needed.
Bug: T198214
Change-Id: I082bfb4585632dc37464d04aa93938ca05a9fdd0
If we're going to call `OutputPage::addWikiText` to parse the message,
we don't need to pre-expand `{{...}}` markup using `Message::text()`
before passing it to the parser; `Message::plain()` works fine. This
makes these callsites consistent with how `OutputPage::addWikiMsg()`
inserts messages.
Bug: T206574
Change-Id: Ic6e9c24139613f9c46e814f630c08d5a52789032
Follow up Ie956fe86184535a376d0398483ac3c853fa9127c
Make SimpleCaptcha::shouldCheck public since it is
called by Flow/includes/SpamFilter/ConfirmEdit.php(35)
and is now failing in production.
Bug: T199811
Change-Id: I85a813aaa06b896266c320089e24ca2e5e81d0ee