Switch test case with services to use a
service other than ObjectFactory, to make
it easier to mock.
Change-Id: I374a516b6bcc8111b2432245faf935f8287d45a7
If the call to file_put_contents fails, say something and exit
non-zero instead of silently ignoring the error.
Additionally, don't write a newline to STDERR in quiet mode.
Change-Id: I3b69c6c40fea6f689b6e1a4d550e87fafd200410
For now, this complains about 7.4.0 – 7.4.8, and 7.3.0 - 7.3.18.
We will back-port this to the REL1_35 live release branch with
modifications as that requires 7.3.19+ already.
Bug: T246594
Bug: T270228
Change-Id: If5c7e3c1ba9dd9f6561c1de18130ded3aadc7149
- JavaScriptMinifier: The public interface for this internal class is
ResourceLoader::filter which, except for one caller (minify.php)
is indeed consistently used already, no other callers need replacing.
- CSSMin: Idem for minification, however, this class has some other
method as well, which have a number of internal users, but none
outside core. These have all been replaced in this commit.
- Remove pear/net_url2 as own dependency as this was only used by CSSMin
and recently added there. This is now a dependency of wikimedia/minify
instead. This was not part of the public API and no longer mentioned
here in composer.json or RELEASE-NOTES. (It remains pinned in
mediawiki-vendor, however.)
Bug: T273247
Depends-On: Iadff8c2112d5e53bd994ab4882006e8c644a2379
Depends-On: Id3c6dcc0b952a9efe34b3a9ed88b716101a51f87
Depends-On: I589be910f57289fd908b22db87241b0e52da60d4
Change-Id: I8d71fc64aeecdb31db218b02e361ae9bb0d19b48
As all these flags are all true by default, create inverted
command line flags to selectively set them to false.
Change-Id: I19affd2d0c35799b537c987739a01fdbc2c35a13
Usernames containing certain characters would otherwise break the link
generated in the message. Message documentation already says the name is
intended for being placed in links, and so presumably can be left as-is.
Bug: T275620
Change-Id: If03b034beb5dc56a8569602e604d0345b595d054
Sometimes the special page can’t be created – for example, the list of
registered pages could have changed between the data provider and the
test function, due to extensions conditionally registering their special
pages. Skip the test in this case instead of crashing.
Bug: T275661
Change-Id: I573967ac22ed3a596b4f80b76d395ac948f802e8
Allow to pass User object to Language::formatExpiry which does not
depend on global state when passing a user
Bug: T267445
Change-Id: Ibd2991b7f051f2a7635c5f4844c8cbfab473557e
When generating random session IDs (used primarily for EventLogging),
we preferentially make use of the WebCrypto API's getRandomValues
method. We have been seeing this method fail occasionally in Firefox
with OperationErrors. This change adds a try-catch block allowing us
to fall back to using Math.random to generate random values if the
crypto-based getRandomValues method fails.
Bug: T263041
Change-Id: I1473ea22884404f8f7b95457e5ddda835ce4e5a6
hasOption always returns true after getOption has been called
(T275619), so just use the result of getOption instead, which
will be a string or false.
Bug: T275627
Change-Id: I23b9a5258cc8ef3532eb18c5fa974c2989937c80
Per the comment in extractBasePaths(), remoteBasePath is typically '/'
when MediaWiki is installed in the document root. CSSMin knows what to
do with that, but getRemotePath() was getting it wrong, generating an
invalid protocol-relative URL.
So, add a simple hack for this case.
Change-Id: I16abf482e3a1a4a548c571de0e81cb3c1bdf55e1
There's still room for improvement - batching users by prefix
can be abstracted into the UserSelectQueryBuilder, but I'll do that
separately. It still references actor_id, but that's because
we still have to explicitly query rev_user_temp, and different
paging will mess up the continuation. After completing actor
migration I think we can order the results differently.
Change-Id: I75ff6081f8ecb9fd0dcdd7bbd8b0c974ae71101c