Commit graph

95760 commits

Author SHA1 Message Date
DannyS712
71b64e46e4 ChangesList::insertRollback - remove internal use of Revision objects
Bug: T246284
Change-Id: I0f506e73eee994c1dd8610803f8ce1c53164ca59
2020-04-27 22:10:25 +00:00
James D. Forrester
1c24141991 MultiHttpClient: Also fallover to non-curl if curl_multi* is blocked
Requested by a user at https://www.mediawiki.org/wiki/Topic:Vkk1ahk3eggd9747 for
whom their hoster provides curl but with multi-threaded functions removed for
some reason.

Change-Id: Id3877c600ae02feffb67f74a815430f8e679230a
2020-04-27 14:43:38 -07:00
jenkins-bot
9a939d38d0 Merge "RevisionStore and PageUpdater: handle stale page ID" 2020-04-27 21:16:52 +00:00
jenkins-bot
d3d759cee4 Merge "Hard deprecate using Revision objects in ContentHandler::getUndoContent" 2020-04-27 21:10:37 +00:00
jenkins-bot
15a9533269 Merge "MergeHistory: Remove all uses of Revision objects" 2020-04-27 20:58:26 +00:00
jenkins-bot
c696170cbf Merge "Pass RevisionRecord to DifferenceEngine::getRevisionHeader" 2020-04-27 20:48:26 +00:00
jenkins-bot
89f14cf3e1 Merge "Hook interface doc comment followup" 2020-04-27 19:40:14 +00:00
C. Scott Ananian
efb5afe7eb Fix incorrect return type documentation for Parser::getRevisionUser()
Change-Id: I2ad51797d841e4cc2a433a27bbaa07b5a2f9a62c
2020-04-27 18:59:02 +00:00
DannyS712
dd8553d550 Pass RevisionRecord to DifferenceEngine::getRevisionHeader
Hard deprecate using Revision objects

Bug: T249561
Change-Id: Icf543635216ed06f3448a76faa97b459aa07f8e5
2020-04-27 18:51:05 +00:00
jenkins-bot
819da314c6 Merge "Replace uses and hard deprecate Article::getRevisionFetched" 2020-04-27 18:33:39 +00:00
jenkins-bot
5e732f662c Merge "deprecation: Remove DeprecationHelper::newArgumentWithDeprecation and change callers accordingly" 2020-04-27 17:57:36 +00:00
Peter Ovchyn
7d57b967b5 deprecation: Remove DeprecationHelper::newArgumentWithDeprecation and change callers accordingly
Bug: T245075
Change-Id: I0714b1c5d5a379cfe3ca473b72244d4d6bd1b7b8
2020-04-27 20:23:58 +03:00
DannyS712
5fae7fd767 SpecialUndelete: Make showDiff private, use RevisionRecord
Had no visibility defined; no deployed uses outside of the file:
https://codesearch.wmflabs.org/deployed/?q=-%3EshowDiff%5C(&i=nope&files=&repos=

Also removes use of Revision::getContentHandler.

Bug: T249561
Bug: T250981
Change-Id: Iaab55713eb616780c0b2b7429ad099b5d19fd73c
2020-04-27 17:06:16 +00:00
jenkins-bot
23ea146129 Merge "DifferenceEngine::getRevisionHeader - accept a RevisionRecord" 2020-04-27 16:51:53 +00:00
jenkins-bot
45527247d3 Merge "CategoryMembershipChangeTest: Remove use of Revision objects" 2020-04-27 16:50:23 +00:00
jenkins-bot
e2c95db9a0 Merge "Hard deprecate Revision::getNext" 2020-04-27 15:24:46 +00:00
jenkins-bot
d96f876a31 Merge "Hard deprecate Article methods proxying to WikiPage" 2020-04-27 13:44:55 +00:00
jenkins-bot
9ff388923d Merge "Change Moroccan Arabic (ary) to Arabic script" 2020-04-27 13:42:37 +00:00
jenkins-bot
88365cc38b Merge "rest: Replace backtick with double-quote in English messages for REST API" 2020-04-27 13:24:42 +00:00
jenkins-bot
6870c216e3 Merge "Add Amis (ami) to Names.php" 2020-04-27 08:41:16 +00:00
Peter Ovchyn
76f881405d rest: Replace backtick with double-quote in English messages for REST API
Bug: T249827
Change-Id: I42a4db4e7a2d26e1cdabc80de04bbc8460daf512
2020-04-27 11:29:17 +03:00
jenkins-bot
8599c914bb Merge "Update linksearch-text i18n" 2020-04-27 07:50:54 +00:00
Translation updater bot
1925a193ce Localisation updates from https://translatewiki.net.
Change-Id: I22d4808c4db663626e68abd1167eef4ee80fee7c
2020-04-27 09:01:07 +02:00
DannyS712
232dc98d54 Hard deprecate Revision::getNext
Unused in deployed code, see codesearch:
https://codesearch.wmflabs.org/deployed/?q=-%3EgetNext%5C(%5C)&i=nope&files=%5C.php%24&repos=

Bug: T246284
Change-Id: Ic216093500418526029dde3a8ae4314b35361b13
2020-04-27 04:12:24 +00:00
jenkins-bot
33a2f3553d Merge "Remove password reset invalid email message" 2020-04-27 04:01:40 +00:00
DannyS712
511b528227 DifferenceEngine::getRevisionHeader - accept a RevisionRecord
Using Revision is not deprecated yet

Bug: T250608
Depends-On: Ic13220b3120dbecd83685ce3553c5b5a6c1e7fdd
Change-Id: I648cb62460f6ca20217a21c462e842d82ae06613
2020-04-26 23:41:47 +00:00
Max Semenik
73cfdfefa4 Add const visibility to includes/media
Change-Id: I80ec7aa44b1ea5e7b7d6193732b7da03d7f11960
2020-04-26 23:25:41 +00:00
DannyS712
625db9aca3 Hard deprecate using Revision objects in ContentHandler::getUndoContent
Bug: T250773
Change-Id: Id7a5f457637e1c8cf411a07c746004770507d6a7
2020-04-26 21:55:28 +00:00
jenkins-bot
8658f91d16 Merge "Add notification type success to mw.notify" 2020-04-26 09:57:40 +00:00
jenkins-bot
08df51ddac Merge "title: Remove broken handling of language variant in getCdnUrls()" 2020-04-24 20:50:20 +00:00
RhinosF1
899959d1bb Update linksearch-text i18n
The instructions regarding requiring a TLD are no longer valid. '*' can be used by itself.

Bug: T241958
Change-Id: Iadc3c09bb2db330950f27ee12fc36585c18f71d1
2020-04-24 17:29:22 +00:00
Translation updater bot
5fc0ab4a2c Localisation updates from https://translatewiki.net.
Change-Id: I7f34f51e3a3220aa2982118036c8fc1f41fd9069
2020-04-24 08:21:03 +02:00
DannyS712
c2339e03fd CategoryMembershipChangeTest: Remove use of Revision objects
Bug: T250980
Change-Id: Id949cb53df37693b20fab767a83021da38ce5986
2020-04-24 04:36:51 +00:00
DannyS712
ca8aa4d6b2 Replace uses and hard deprecate Article::getRevisionFetched
Returns a Revision object; only deployed uses are in core
Make fetchRevisionRecord public as the replacement
Also removes a use of Revision::getContentHandler

Bug: T249393
Bug: T250981
Change-Id: Ib8f399e451c3a9b942001b48ea9a138f405c894c
2020-04-24 04:01:32 +00:00
DannyS712
c20306e64c MergeHistory: Remove all uses of Revision objects
Bug: T246284
Change-Id: Ia978f72221385a8793d5ed4df7ecdcd98f56fc36
2020-04-23 18:25:22 -07:00
ArtBaltai
b32787cba2 Hard deprecate Article methods proxying to WikiPage
Hard deprecate and rewrite call of proxy methods
Deprecate Article::$mContext. It should become private

Bug: T239975
Change-Id: I92018a02b00fdc0b6cd90dfc77ad27782322f344
2020-04-24 01:02:16 +03:00
Timo Tijhof
eabf8afbd8 mediawiki.jqueryMsg: Refactor test suite to not make any API requests
This test was an awful, awful, mess. (And I take full responsibility.)
Changing the global user language mid-way into execution is in no way
supported by ResourceLoader and this test was going through great
lengths to fool mw.loader about what's really going on.

Basically, all we're doing is get a list of instructions on what tests
to run, get comparison values based how the PHP side proceses these
(for parity comparison), and then run the assertions.

The mw.language singleton already has support for multiple languages,
and mediawiki.jqueryMsg already supports injecting data and constructing
new instances for each test case. Make use of that :)

Instead of calling ResourceLoaderLanguageDataModule::getData by
trying to hot load the same module repeatedly from load.php,
just export this data using 'packageFiles'.

The mediawiki.jqueryMsg QUnit suite previously took 4s to run locally
and now only 0.1s (145ms). This is not only significant for this
particular module, but also for QUnit in general as Headless Chrome
only took about 7s to run all of MediaWiki core's test suites prior
to this change, which is now down to ~3s. (MacBook Pro)

For WMF CI:

* Before (master commit):
  - mediawiki.jqueryMsg.test: ~2.1s (2135ms)
  - MediaWiki core total: ~4.8s
* After (this patch):
  - mediawiki.jqueryMsg.test: ~0.015s (15ms)
  - MediaWiki core total: ~3.6s

Bug: T250045
Bug: T225730
Change-Id: I5f1067feb0a43d63bfc5e7fff5110285a5e433c8
2020-04-23 21:59:50 +01:00
Timo Tijhof
9232f729b4 qunit: Disable mw.loader.store server-side instead of client-side
== What

This feature is disabled initially because we want to be able to
test it. When mw.loader's own tests are testing mw.loader.store,
they are mocking setTimeout and mw.requestIdleCallback, so that
they can then make mw.loader.store schedule its "flush" callback
and via the mock timer control when it executes and then assert
its result.

== The Bad

Previously an inline JS hack was concatenated right after startup.js,
and that seems like it should be early enough to prevent anything
from initialising mw.loader.store and scheduling a real 2s flush timer.

There is no obvious sign here that the startup module response would
request or implement a module (which could inititialise mw.loader.store).
However, there is.

== …, the Ugly

The startup response contains RLQ processing (which is empty in
the standalone test runner, so no worries here) and a call to
mw.loader.load for RLPAGEMODULES. The RLPAGEMODULES list is empty,
but it does still make a call to mw.loader.load(). And that
expands the empty array to include jquery+mediawiki.base and thus
makes a proper module request, which then initialises mw.loader.store
and schedules its 2s flush timeout.

This hasn't caused failing tests in CI so far, because there are
generally at least 2 seconds of unrelated tests that run first.
So by the time mw.loader's test suite comes around, it has
been disabled and the previous flush has already completed.

== … and the Good

Change I5f1067feb0a43d makes the 'mediawiki.jqueryMsg' test suite
super fast (previously took 2+ seconds, longer than any other test).

This exposes the fact that mw.loader.store was in fact not
actually properly disabled from the get go, and so tests would
be failing.

Bug: T250045
Change-Id: I38c3ad2a9a5813215dbb210bddafcc3cdd70295d
2020-04-23 20:52:57 +00:00
Timo Tijhof
41f7ae2db2 qunit: Remove dead code from SpecialJavaScriptTest
* Remove calls to setHeaders(), disallowUserJs().
  These never do anything because the 10 lines of standalone HTML
  page outputs don't consult OutputPage or Skin.

  The exception was the 404 handler for if you visited
  Special:JavaScriptTest/bogus, where there is nothing to protect,
  not to mention that the page is disabled by default and in any
  production environment anyhow.

* Inline the 404 handler logic.

* Update the outdated documentation for exportQUnit().

Bug: T250045
Change-Id: I2b9d712f439b270ae998e994113b7f3cd8601abf
2020-04-23 21:48:42 +01:00
Timo Tijhof
707af79317 qunit: Remove div#mw-javascripttest-summary from SpecialJavaScriptTest
The intro text visually renders the same without it. The parsed
message already has its own block (a paragraph).

This div is a left-over from when the test runner was a skinned
page, and we had some CSS to style it in a fancy way. All that
was removed many years a go in favour of the 10-line standalone
HTML testrunner we have today.

Bug: T250045
Change-Id: Iffcca90857cf8e5df09a9287ab22fad109df7b79
2020-04-23 20:48:15 +00:00
Timo Tijhof
8decad60a6 qunit: Load qunitjs directly instead of via load.php
Much less indirection this way, making the test runner a bit easier
to reason about (maintenance-wise) and easier to debug for developers.
Minification doesn't help here anyway (quite the opposite).

This also means the legacy option to load a module synchronously
from ResourceLoader\ClientHtml can be removed. This option existed
solely to bootstrap the QUnit test runner, and can be removed in a
subsequent commit.

Bug: T250045
Change-Id: I73985048382e9cc754753ed84f04d25214c07599
2020-04-23 21:47:46 +01:00
jenkins-bot
b59a8c783e Merge "Hard deprecate WikiPage::getUndoContent" 2020-04-23 20:19:29 +00:00
jenkins-bot
e399b12561 Merge "ooui: Fix ButtonWidget jsduck demo" 2020-04-23 20:13:44 +00:00
jenkins-bot
ceb35af087 Merge "mediawiki.util: Clean up addPortletLink tests" 2020-04-23 19:59:51 +00:00
jenkins-bot
39e2395bfc Merge "qunit: Add assert.domEqual helper method" 2020-04-23 19:58:20 +00:00
jenkins-bot
a43b4bd538 Merge "qunit: Use "test.*" module names only for actual test suites" 2020-04-23 19:55:55 +00:00
DannyS712
d4e06a3d65 Hard deprecate WikiPage::getUndoContent
Replace use in EditPage

Bug: T250680
Change-Id: I12c82b514643e1fdf2f05951a04659bb46312ddc
2020-04-23 07:47:49 +00:00
Amir Aharoni
99f7e85ef9 Change Moroccan Arabic (ary) to Arabic script
Requested in bug T237672, and the Language committee
doesn't object.

Bug: T237672
Change-Id: I09925647aa03b736c95aaf34c22d16dc7ea4d102
2020-04-23 10:10:57 +03:00
Translation updater bot
34bddfced5 Localisation updates from https://translatewiki.net.
Change-Id: Ic8f5e82a69d29b1767890481fe9a0d2fced48c71
2020-04-23 08:41:41 +02:00
Timo Tijhof
851eb4b9c8 qunit: Use "test.*" module names only for actual test suites
This will make it easy to later allow the user to select which
component's specs to load and run (via CLI and GUI), e.g. for
an entire extension. We currently only have very narrow or very
wide selection mechanisms ('module' param for 1 module,
'rerun' for 1 test case, 'filter' param for global pattern match).

Bug: T250045
Depends-On: I55fe27e1c74972fcb3cdafefdc78e10e24f95b80
Change-Id: I5c01f720d787c3847228de511ce913284786ad66
2020-04-22 21:11:12 +00:00