Commit graph

7081 commits

Author SHA1 Message Date
Translation updater bot 2cccbdbe2d Localisation updates from https://translatewiki.net.
Change-Id: Ibfbcdd60d0b46b17297aa4ed2a69494dacaa2234
2023-09-06 08:41:53 +02:00
Bartosz Dziewoński 18ed307c39 ForeignWikiRequest: Ensure fetching CSRF tokens uses unique CentralAuth tokens
getCsrfToken() previously did the requests to every wiki with the same
'centralauthtoken'. Luckily this wasn't causing any bugs in practice,
because all users of ForeignWikiRequest that need CSRF tokens always
use it with a single wiki.

Change-Id: Ib1c0b9c13a34e38f85faed519c46cabd3b77e61e
2023-09-04 23:39:40 +02:00
Bartosz Dziewoński c3c3aed4dc ForeignWikiRequest: Specify formatversion, errorformat
Otherwise the parameters are copied from the local API request.
That mostly works fine, but browsing the errors logged for T342201
is a bit confusing when they're in different formats.

Change-Id: I5c361d6c0f7d635d3063290dec25f18bc6417e08
2023-09-04 23:39:30 +02:00
jenkins-bot 68d90d69a7 Merge "Make DB tests more robust" 2023-09-01 13:33:23 +00:00
Translation updater bot da265c947b Localisation updates from https://translatewiki.net.
Change-Id: I3c2aa206fd81bc8cf2348bf89824fc054b2916c3
2023-09-01 09:02:49 +02:00
jenkins-bot 697ca08827 Merge "EchoEventPresentationModel: Use userTemporary for temp accounts" 2023-08-30 10:56:01 +00:00
Translation updater bot 4b158caa68 Localisation updates from https://translatewiki.net.
Change-Id: I2cfbbd2a78e9fb428ef7eb95098ef8f8f4088b27
2023-08-30 08:44:13 +02:00
jenkins-bot 8239b38530 Merge "Decommission Echo* instruments" 2023-08-29 21:47:54 +00:00
jenkins-bot 76f5ed4691 Merge "tests: Small changes to DiscussionParserTest" 2023-08-29 19:26:56 +00:00
Sam Smith f4765cdd25 Decommission Echo* instruments
Completely remove the EchoMail and EchoInteraction instruments,
supporting code, and config variables.  Note well that the
EchoEventLoggingSchemas config included an entry for the
already-decommissioned Echo instrument so remove that too.

Bug: T344167
Change-Id: Ic0c44737d2c4a78ec19e67b8b8cd4e6cfb8e14fa
2023-08-29 11:27:15 +01:00
Translation updater bot 80c2f99c54 Localisation updates from https://translatewiki.net.
Change-Id: I73a2baf9ba0dcc244a176939e759921d3ac964cb
2023-08-29 08:28:17 +02:00
Translation updater bot f172890bda Localisation updates from https://translatewiki.net.
Change-Id: I0af06e52bf38ae2f4b2fab601d62c58136cda91f
2023-08-28 09:29:59 +02:00
Umherirrender 0b95ded538 tests: Small changes to DiscussionParserTest
- Remove set of $wgDiff, not used in core and seems not needed
- Avoid array_keys on foreach
- Save settings directly by UserOptionsManager for the fresh user
- Combine calls to overrideConfigValue into one
- Referer core config via MainConfigNames
- Remove unneeded reset after overrideConfigValues, get reset there
- Reset specific service and not all

Change-Id: Ia00efae85e17dfac1768b12b35f44eb834f879ec
2023-08-24 23:31:36 +02:00
Translation updater bot 0f83a89688 Localisation updates from https://translatewiki.net.
Change-Id: If79d75e8940972109b82c8bcb30f57f7f76eaecc
2023-08-24 09:49:33 +02:00
jenkins-bot 38e9654796 Merge "Drop dead code" 2023-08-23 15:06:33 +00:00
Translation updater bot e760784f6e Localisation updates from https://translatewiki.net.
Change-Id: I5996c65f1ca2088b6fc9f1f0180e90a760b3dfcf
2023-08-23 08:39:14 +02:00
Translation updater bot 02ab0b6d41 Localisation updates from https://translatewiki.net.
Change-Id: Id331422a368ca49d26ed3b60817a73a3f83b48cb
2023-08-22 09:01:30 +02:00
Daimona Eaytoy 7b1a9582b2 Make DB tests more robust
In EventMapperTest, suppress notifications created by calling
getExistingTestPage. So far, this test only worked because the existing
test page is created in addCoreDBData (and not inside the test), but
this will no longer be the case after core change
I308617427309815062d54c14f3438cab31b08a73. Clear the PageSaveComplete
hook handlers to prevent that.

DiscussionParser has a static cache of revision data that can become
stale when data is deleted between tests (because revision IDs can be
reassigned to different pages, similar to T344124). This cache seems
needed, and converting the class to a service seems hard, so add the
page title to the cache key to try and avoid collisions. This can still
break if two tests are using the same page, which is hopefully quite
unlikely.

Change-Id: Ic4cbd8ff424e1260544ff9754e0c89dd4bb2f733
2023-08-19 19:59:51 +00:00
jenkins-bot cd5804d27d Merge "Replace some moved Title class uses, now MediaWiki\Title\Title" 2023-08-19 18:58:57 +00:00
James D. Forrester da2fbe366f Switch uses of IDatabase to namespaced version
Bug: T344536
Change-Id: I6f4b158bdc3ef20a1660e66accca0ffc17104f49
2023-08-19 15:01:58 +00:00
gerritbot 84e0d10abd Replace some moved Title class uses, now MediaWiki\Title\Title
Bug: T321681
Change-Id: I19ff201e3a109d5f6b755c6c0857f7b22d08d26d
2023-08-19 16:43:18 +02:00
James D. Forrester 1c39c66d2b build: Update MediaWiki requirement to 1.41
All extensions in the MediaWiki tarball are expected to track MediaWiki's release directly.

Change-Id: I7d91b7cc9929f0b2277bf3955d7f15e38b20f05b
2023-08-19 13:15:32 +08:00
Amir Sarabadani 12a5a48892 Fix phpcs error
Change-Id: I6ac134c280e4e36b3935f9b095d26400ba27d2af
2023-08-19 04:53:14 +02:00
Reedy 8f44150300 And a few more namespaced classes...
Change-Id: I57b56d285bac4b41e81f656f3c1ddceee4620fb5
2023-08-18 22:27:18 +01:00
Reedy b003945c34 Namespace a few more classes
Change-Id: Ie233a4c8291432da3bd25d29337db52a2e97b540
2023-08-18 21:48:15 +01:00
Reedy e576cbdca0 Namespace some more classes
Change-Id: If1405788a4adb550e8a7e8c58b0c2c55cf10ea67
2023-08-18 21:24:59 +01:00
Reedy 1bc5b6daf8 Namespace classes that need aliases
Change-Id: Ieeeaf80d04b060d6dbca1959d5e66f4c69c5a7f2
2023-08-18 19:00:41 +01:00
Martin Urbanec 84a32adb92 EchoEventPresentationModel: Use userTemporary for temp accounts
Bug: T338912
Change-Id: Id4c7dc1506f2f5e4981a19664061503ccb9d802f
2023-08-18 10:31:38 +02:00
Translation updater bot 335a99676d Localisation updates from https://translatewiki.net.
Change-Id: I83f3f336628afe98281bfdaeaf1064be0cfc20c6
2023-08-18 09:08:05 +02:00
Jon Robson 75b6465876 Drop dead code
This code has been moved to Minerva and is no longer serving any
purpose. The handlers are replaced with an already standardized
mw.hook for Minerva to subscribe and respond to.

Bug: T342907
Depends-On: I55c18cf723a32f80b93a01dd0687e005162c4e93
Change-Id: I2f923e509d24524a2375ffbe6b3ef336487574bb
2023-08-17 13:05:12 -05:00
Translation updater bot 0285c7862b Localisation updates from https://translatewiki.net.
Change-Id: I9db3d3a1828d79cf1106daf50f20ee9fd37587ea
2023-08-17 12:09:49 +02:00
Ed Sanders e34220d984 Use shorthand array syntax in comment blocks
Change-Id: Ic5785a473f6db8c0f7ef6aae8260c61f78a07304
2023-08-16 18:12:07 +01:00
Translation updater bot fba11a49da Localisation updates from https://translatewiki.net.
Change-Id: Ifeb6cc28469a204b95f94d714f2e0ecf991b43fe
2023-08-16 09:11:35 +02:00
Umherirrender 8218e2aa23 Use HookHandlers for UserMerge hook
Bug: T315938
Depends-On: Ib78dae49854863af1a37a00636737c94694776ae
Change-Id: I948ef262b9c6f546244e64a62775068bfce79b69
2023-08-16 05:30:19 +00:00
jenkins-bot 078788f411 Merge "Create HookRunner class and the hook handler interfaces" 2023-08-16 05:26:06 +00:00
jenkins-bot 4da2ea7a18 Merge "Use HookHandlers for remaining core hooks" 2023-08-16 01:50:05 +00:00
Umherirrender 63efbc5fd1 Use HookHandlers for remaining core hooks
The use of "HookHandlers" attribute in extension.json makes it possible
to inject services into hook handler classes in a future patch.

Bug: T315938
Change-Id: I84027e2899b4a013b78fe4e95f191f1e4c89b5f8
2023-08-16 09:19:22 +08:00
jenkins-bot 2edfae4cbd Merge "Targets no longer needed in Echo" 2023-08-15 20:49:26 +00:00
WMDE-Fisch 5f7c26c764 Targets no longer needed in Echo
All match current default.

Bug: T328497
Change-Id: Id0e78ee4c62241603198727cb663843d7b1ca553
2023-08-15 19:53:53 +02:00
Daimona Eaytoy ef50bfeda5 Make Title and Revision caches proper services
Singletons are bad, amongst other reasons, because they're never reset
in tests. They can therefore occasionally cause test failures if the
cached data stored in one of these singletons becomes stale.

As noted on the task, ideally these two classes shouldn't exist at all,
and core should be responsible for caching the information it deems
expensive to compute.

As a temporary (TM) workaround, make both classes actual services, so
that the setUp/tearDown logic in MediaWikiIntegrationTestCase can
properly reset them between tests.

Dependencies are intentionally not being injected, precisely because
these classes should just be deleted, not improved.

Bug: T344124
Change-Id: I58b8d9610f9447468235b94d25732528ab6acce6
2023-08-14 17:41:23 +02:00
Translation updater bot 3a4578c456 Localisation updates from https://translatewiki.net.
Change-Id: I5c10993ec34c291bed5d5d586329c522aedadf1f
2023-08-14 09:17:33 +02:00
Umherirrender 9de512d59c tests: Resolve phpunit filename deprecation errors
PHPUnit wants the filenames of the tests to match the class name being
tested.

Bug: T337333
Change-Id: I44f626d1bfdf151fecafc29c51b2cf2bb90481b0
2023-08-12 21:07:15 +02:00
Translation updater bot 154acac786 Localisation updates from https://translatewiki.net.
Change-Id: I2a0fbf70cf65c6e8579643c73cbf49659beead3b
2023-08-11 09:00:09 +02:00
C. Scott Ananian 26aeebd301 Use OutputPage::setPageTitleMsg() instead of ::setPageTitle()
Bug: T343994
Depends-On: I384a12bdb66dfc8fa6650e76e27c671fae5163d6
Change-Id: I1464c9f7db3b30ad9bb12377cc39cfcd5d540f78
2023-08-10 16:28:23 -04:00
Jon Robson c50d129b02 Disable Echo behaviour on Minerva desktop
Bug: T342907
Change-Id: Ibd311593eb7f153ff0dea8aad516759d54cc1cd2
2023-08-08 10:47:19 -07:00
Translation updater bot 0974aebf1d Localisation updates from https://translatewiki.net.
Change-Id: I50df240fcb2896c997ae6072ea692b2d4cb49815
2023-08-08 09:00:52 +02:00
Daimona Eaytoy 9f44f98e81 Do not assume what user IDs might be in DiscussionParserTest
The test was assuming that the ID 1 belongs to a user other than the one
being created in the test. This is not necessarily the case, so make it
use an ID that is guaranteed to be different.

Also rename the test fail to avoid a PHPUnit deprecation of test class
name not matching file name.

Bug: T342428
Change-Id: Ied1869e380b023c1a726a5be610e1de1b68c78c0
2023-08-07 16:27:28 +02:00
Translation updater bot 9ad06f78b6 Localisation updates from https://translatewiki.net.
Change-Id: I31b5ad5938849dc9578d2cb1bf3a7fdb54a18f22
2023-08-07 08:38:16 +02:00
Daimona Eaytoy f7b0638ff0 Mock DB services in NotificationTest::testNewFromRowWithException
The test doesn't need the database, but it's currently trying to use it.
Mock all services used by EchoDbFactory to avoid that (the Factory
cannot be mocked directly because it's created with a static method and
not injected).

Change-Id: I359489ed3f8de6e868a590d5c7c02f81f0a2049d
2023-08-06 22:48:58 +02:00
Umherirrender e52a792060 Create HookRunner class and the hook handler interfaces
Bug: T315938
Change-Id: Iffa2b409502b4269c9746e0304feb4aaee37a86e
2023-08-06 10:30:46 +00:00