There are some usages outside of SpamBlacklist that must be fixed. After
doing that, the signature should be updated to make the user
non-optional.
Note: I've changed the signature because external callers only pass the
first two parameters. Hence, it's easier to change it now, add a
User parameter to the callers and then make it non-optional, than having
to pass $preserveLog and $mode in all callers and then swapping the
order (as that would break the world).
Change-Id: I0714eb9dbc6af3c775ab7a81cb4b59e687183f77
Tests need a way to rest BaseBlacklist::instances, so they can be sure
they operate on a clean slate. This is also needed to ensure they do not
operate on real settings, targetting a real remote host.
Bug: T262443
Change-Id: Ic320f7a72da7f26e0931ce3d393fc5a61d43d4fc
Revision::getQueryInfo() was added in MediaWiki 1.31. We already
require that or later in our extension.json, so we can safely drop it.
The deprecated methods called by this code have been recently removed
(Id35544b879af1cd708f3efd303fce8d9a1b9eb02) and calling them is
causing Phan failures.
Change-Id: I474367d00c6d3917f1416023901132c0649b3163
Replacement with services made available in 1.28 and this extension
requires 1.31. So, the replacement is good.
Change-Id: I1960a36541c9578abc3178a3a5ddcac7c32b8292
Introduce BaseBlacklist::getSpamBlacklist() and getEmailBlacklist()
as type-documented alternatives to getInstance( 'email/spam' ) so we
don't need to keep documentating types in a comment when using a function
that isn't included in the base class.
Change-Id: Ic8bd8f803ddbce1294707d5f1d62b701e24d8c6e