Commit graph

125922 commits

Author SHA1 Message Date
jenkins-bot
def22d80e9 Merge "jobqueue: remove JobQueueDB::getScopedNoTrxFlag() method" 2024-08-12 17:53:23 +00:00
jenkins-bot
11dded2d57 Merge "objectcache: make SqlBagOStuff correctly ignore DBO_DEFAULT" 2024-08-12 17:42:22 +00:00
Aaron Schulz
c924df89e2 jobqueue: remove JobQueueDB::getScopedNoTrxFlag() method
We already use CONN_TRX_AUTOCOMMIT for mysql/postgres and
a separate DB file (e.g. "server" config) for sqlite (via
the installer). For any legacy case where the main DB is
still used with sqlite, the removed method was unlikely to
be very effective.

Ignore DBO_TRX/DBO_DEFAULT in JobQueueDB "server" config
for good measure, similar to SqlBagOStuff.

This removes more direct uses of IDatabase::setFlags(),
a method which does not play well with DBConnRef.

Bug: T311090
Change-Id: Ia8457dea2ed30539e23345f89cb6b382be442975
2024-08-12 17:16:17 +00:00
jenkins-bot
93a736dfde Merge "deferred: simplify $dependeeDbws parameter type for MWCallableUpdate" 2024-08-12 17:02:03 +00:00
jenkins-bot
959ebbed6a Merge "objectcache: Consolidate WRITE_PRUNE_SEGMENTS into WRITE_ALLOW_SEGMENTS" 2024-08-12 16:16:10 +00:00
jenkins-bot
fdb062fef3 Merge "WikiPage: Use getReplicaDatabase instead of getMaintenanceConnectionRef" 2024-08-12 12:15:47 +00:00
jenkins-bot
164a5d713b Merge "[Re-apply] Selenium tests: Skip wikitext-specific tests if NS_MAIN isn't wikitext" 2024-08-12 09:51:55 +00:00
Translation updater bot
803e854a20 Localisation updates from https://translatewiki.net.
Change-Id: If602f5635de9c22f25fb96ff90333f4a6144d1d8
2024-08-12 07:33:18 +00:00
jenkins-bot
05f81c01b2 Merge "Use Codex provided icon and color in HTMLCheckMatrix" 2024-08-11 23:21:31 +00:00
Ebrahim Byagowi
bf8937593f Use Codex provided icon and color in HTMLCheckMatrix
The only use of images/questions.svg apparently was in
HTMLCheckMatrix and this removes the use making deletion
of the asset also possible.

As this uses a Codex provided color, it makes the help icon
to now look correctly in the dark mode also.

This is done in a way that HTMLCheckMatrix's clients can
provide their own style to override the icon like before.

The main motivation behind this is to remove inaccurate
:lang() selectors this had for the help icon's localization which
was supposed to support different languages that use an RTL script
but the Codex one also already provides the same and more
complete logic automatically using the Less mixin it provides.

Change-Id: If5d11fd9c6fc9d528f6792d2d35fa097c89fba5a
2024-08-11 19:18:11 +00:00
jenkins-bot
4701da2124 Merge "Update composer/semver to 3.4.2" 2024-08-11 17:56:54 +00:00
jenkins-bot
8c9692e449 Merge "Consolidate Maintenance 'includes' code in one place" 2024-08-11 17:09:29 +00:00
Dreamy Jazz
db256147e9 Test edit.php
Why:
* The maintenance scripts in core are mostly untested and testing
  them will ensure that they are more reliable and resistant to
  regressions.

What:
* Create EditTest

Bug: T371167
Change-Id: Ib57bdc82b13fe8cd353716edd99862553bc1b870
2024-08-11 16:37:31 +00:00
James D. Forrester
285682ab41 Consolidate Maintenance 'includes' code in one place
Change-Id: Ifd20f164e5cafe52efdf4fa65e39289214d68696
2024-08-11 18:09:08 +02:00
Chiefwei
3f579dd6e4 Chinese Conversion Table Update 2024-3
Update the Chinese conversion table routinely to fix bugs reported at
https://zh.wikipedia.org/wiki/Wikipedia:字词转换/修复请求.

It is only data changes and only works for Chinese WikiProjects.

Change-Id: I50920b1be658741bfb3643e3992b3ebd6727e0ec
2024-08-11 15:16:55 +00:00
jenkins-bot
b3a0d3dee7 Merge "build: Update mediawiki/mediawiki-codesniffer to 44.0.0" 2024-08-11 15:16:38 +00:00
jenkins-bot
f25b780a34 Merge "Add full stop into blockedtext-reason-comment" 2024-08-11 11:45:15 +00:00
James D. Forrester
658ea71777 Update composer/semver to 3.4.2
Bug: T370235
Depends-On: Ic4c091c149c445be3f8e4c2970726af095b82865
Change-Id: Id15a4d180a8381fa21e920c0e184f419e7ffa830
2024-08-11 13:12:00 +02:00
James D. Forrester
1b29886a32 build: Update mediawiki/mediawiki-codesniffer to 44.0.0
Change-Id: Ic83ac1282b1b0b414450aa69731a9efcc55db665
2024-08-11 13:08:16 +02:00
jenkins-bot
99ef4cadf2 Merge "Move Language and friends into Language namespace" 2024-08-11 10:50:15 +00:00
jenkins-bot
2e1156a0f0 Merge "specials: Remove page join from Special:MostLinked query" 2024-08-11 10:03:35 +00:00
Amir E. Aharoni
b880acd348 Add full stop into blockedtext-reason-comment
The following patches should be merged immediately
after this one:
I66fbebe2f43484973fa060285e1b41efae499864
I13c7d94b050a38e9d5599493af34266029e97225

Bug: T372213
Change-Id: Ice859477e511b38f7bf6c051082d04f6c83a10e7
2024-08-11 06:53:40 +00:00
jenkins-bot
4425fa0071 Merge "Test cleanupWatchlist.php" 2024-08-10 15:41:08 +00:00
Dreamy Jazz
b68e3062fa Test findClasses.php
Why:
* Maintenance scripts in core are mostly untested and testing the
  less complex scripts will enable quicker raising of the
  coverage.

What:
* Add FindClassesTest

Bug: T371167
Change-Id: I8bc9ef7c7bc59b675734f00bf5c2c0892bba8c3a
2024-08-10 14:51:58 +00:00
jenkins-bot
e9cd650109 Merge "Test deleteArchivedRevisions.php" 2024-08-10 13:55:01 +00:00
jenkins-bot
efa45afabb Merge "Expand MaintenanceTest" 2024-08-10 12:58:25 +00:00
Dreamy Jazz
5c9e3ccd09 Test deleteArchivedRevisions.php
Why:
* The maintenance scripts in core have poor test coverage and
  testing the less complex scripts will help to address this.

What:
* Create DeleteArchivedRevisionsTest

Bug: T371167
Change-Id: I6e61f7a9d62892a92d6f2af21248889e155bf30e
2024-08-10 12:54:33 +00:00
jenkins-bot
3f5699c8bc Merge "Fix blockUsers.php handling of an invalid performer option" 2024-08-10 12:50:28 +00:00
jenkins-bot
b1b806b93c Merge "ViewCLITest: Cover non-text content models too" 2024-08-10 12:50:15 +00:00
jenkins-bot
5aea156ec0 Merge "ShowJobsTest: Cover the filter check branch" 2024-08-10 12:50:07 +00:00
jenkins-bot
a93c3bcb0e Merge "Test protect.php for invalid arguments and options" 2024-08-10 12:36:38 +00:00
jenkins-bot
9252affe4d Merge "Partially test manageJobs.php" 2024-08-10 12:36:31 +00:00
Dreamy Jazz
a7e632beaf Test cleanupWatchlist.php
Why:
* Maintenance scripts in core have poor test coverage and improving
  this will help make them more reliable.

What:
* Create CleanupWatchlistTest which tests cleanupWatchlist.php

Bug: T371167
Change-Id: I8cdc241a3f6ae94c3f301e7802ff80bcbc62f38a
2024-08-10 12:27:29 +00:00
jenkins-bot
f23bf39f44 Merge "Test clearInterwikiCache.php" 2024-08-10 12:18:40 +00:00
jenkins-bot
285aeae0ff Merge "Expand GetTextMaintTest" 2024-08-10 12:18:31 +00:00
jenkins-bot
d7adddeba7 Merge "ResetPageRandomTest: Cover the other option check branch" 2024-08-10 12:18:23 +00:00
jenkins-bot
117330d953 Merge "Add data-language-autonym and data-title attributes to interlanguage links" 2024-08-10 12:06:32 +00:00
Dreamy Jazz
02b61cc2d0 Expand MaintenanceTest
Why:
* Some less-complex methods in the Maintenance class are not
  tested and testing these should be easy to achieve.

What:
* Expand MaintenanceTest

Bug: T371167
Change-Id: I0a5968054a80bb79be261b9c4fa99f7a1732b0ff
2024-08-10 13:50:12 +02:00
James D. Forrester
338454be9b ViewCLITest: Cover non-text content models too
Bug: T371167
Change-Id: I07c3bb13322dd8961071d482614c282974a20093
2024-08-10 11:45:28 +00:00
James D. Forrester
bc662aec9b Move Language and friends into Language namespace
Bug: T353458
Change-Id: Id3202c0c4f4a2043bf97b7caee081acab684155c
2024-08-10 13:36:30 +02:00
Dreamy Jazz
70b8b61d72 Fix blockUsers.php handling of an invalid performer option
Why:
* The blockUsers.php maintenance script can set the performer's
  username as the username provided via the --performer option.
* The username is validated by the script, but the validation broke
  in c106f679b0. This was because both:
** The check for whether the username was invalid changed to only
   looking for 'null' values returned by User::newSystemUser /
   User::newFromName.
** The User::newFromName method returns false on an invalid username.
* Replacing the deprecated User::newFromName with the call to
  UserFactory::newFromName fixes this issue, as the replacement
  method returns null on an invalid username.
** This also allows replacement of a deprecated method, which is
   preferrable to changing the 'null' check to be a falsey check.

What:
* Replace the call to User::newFromName with UserFactory
  ::newFromName to fix this issue.
* Add a test to verify that this fix worked.

Bug: T371167
Change-Id: Ie181c16a1dda559a81b8ae4d53cd8f69b1af9b75
2024-08-10 11:33:58 +00:00
jenkins-bot
4b3504cd36 Merge "Remove dysfunctional links underline removal" 2024-08-10 11:33:35 +00:00
jenkins-bot
22163e47a7 Merge "Add MediaWiki\Registration namespace to registration classes" 2024-08-10 11:33:27 +00:00
Dreamy Jazz
fc6b2581e6 Partially test manageJobs.php
Why:
* The test coverage on maintenance scripts is poor, and so testing
  scripts which are less complex is a good way to increase the
  coverage.

What:
* Create ManageJobsTest which partly tests the maintenance script
  by testing an invalid action option and also the delete action
  option.

Bug: T371167
Change-Id: I08becca39d9bd070cb70b2a21a9e7da953374668
2024-08-10 11:20:01 +00:00
Dreamy Jazz
f9d59fd08e Expand GetTextMaintTest
Why:
* The tests for getText.php do not currently cover the situation
  where ::fatalError is called, because before
  I554a963c63eb4f22ebb3273053a7b83a33dcb4d1 this would cause the
  test suite to exit early.
** After that patch, it will throw an error instead of calling
   exit() when running PHPUnit tests.
* With that patch, it is possible to test the script for
  situations where we expect ::fatalError to be called.

What:
* Expand GetTextMaintTest to test what happens when the title
  argument is invalid (i.e. a invalid page name or a page name
  that does not exist).

Bug: T371167
Change-Id: I45f9e7d04c945e1c3a5045c13093bc9170c41ac4
2024-08-10 11:19:39 +00:00
James D. Forrester
4da8e99751 ResetPageRandomTest: Cover the other option check branch
Bug: T371167
Change-Id: I35f5239b98ac59ef615d15dd54605a2dfc915a33
2024-08-10 11:18:42 +00:00
jenkins-bot
2c98129419 Merge "Move remaining four classes in includes/content into Content namespace" 2024-08-10 11:11:26 +00:00
jenkins-bot
7ba321855c Merge "Test code in Maintenance class that calls ::fatalError" 2024-08-10 11:10:04 +00:00
jenkins-bot
a8139fcfc7 Merge "Test wikiBirthday.php" 2024-08-10 11:08:50 +00:00
jenkins-bot
1b0fc4479f Merge "Test renameRestrictions.php" 2024-08-10 10:57:33 +00:00