Commit graph

125345 commits

Author SHA1 Message Date
C. Scott Ananian
1a1ac6a82d [HtmlOutputRendererHelper] Remove use of ParsoidOutputAccess::parseUncacheable
This removes the last use of ParsoidOutputAccess in core, allowing it
to be deprecated and eventually removed.

Bug: T367074
Bug: T317018
Change-Id: Ica2c880e2e7c2b126aaea66a3e4be460b3f2234f
2024-07-19 03:09:32 -04:00
Srishakatux
6340a6f1f2 Add namespace translations for isv-latn
Based on translations provided here: https://translatewiki.net/wiki/User_talk:IJzeren_Jan#Namespaces

Bug: T367688
Change-Id: I9aec55d47be7ca85ad82ed3ea97645107ad8998a
2024-07-18 20:17:18 +00:00
jenkins-bot
3184181396 Merge "Remove comment about floatleft/floatright/tright/tleft location" 2024-07-18 19:40:44 +00:00
jenkins-bot
5b92180bfa Merge "REST: avoid crash on non-strings in request body" 2024-07-18 19:27:51 +00:00
jenkins-bot
a4af2c2c6e Merge "[i18n] Change the names of the Arabic months" 2024-07-18 19:17:18 +00:00
Steven Rawson
9f49f1aa91 Remove comment about floatleft/floatright/tright/tleft location
The CSS for these classes was moved to content.thumbnails-common.less,
which makes the removed comment incorrect.

Bug: T366968
Change-Id: If72c00f97cf2d376bb45bcdbf8a515bd45c9e9cc
2024-07-18 19:08:19 +00:00
GergesShamon
51106043b0 [i18n] Change the names of the Arabic months
Bug: T370456
Change-Id: Ib5257276e38884eb7711c2c0842e4ed6ab58cf39
2024-07-18 18:44:26 +00:00
jenkins-bot
98ebc56a12 Merge "Remove unused @dataProvider from TitleValueTest" 2024-07-18 18:02:44 +00:00
jenkins-bot
19cf9f7798 Merge "ResourceLoader: Hardcode the default math before Less.php 5.0 upgrade" 2024-07-18 17:30:00 +00:00
jenkins-bot
e60571aaee Merge "Stop using LBFactory in UserEditCountInitJobTest" 2024-07-18 17:28:10 +00:00
jenkins-bot
9888f1eabe Merge "MoveLogFormatter::getPreloadTitles: Handle bad titles" 2024-07-18 17:16:51 +00:00
Hannah Okwelum
cbdff49fe1 ResourceLoader: Hardcode the default math before Less.php 5.0 upgrade
v5.0 of less.php defaults to only doing division in parenthesis. From this task T368921, we see this will change the behaviour of a lot of extensions. Pending when that task is completed, we could set the default in ResourceLoader to always do division in or outside  parenthesis.

This is separate from I8cfb6aa11ac6766563221023c0, because otherwise
the mediawiki/vendor patch (Id70b0f4188e70f3e4b37a93a0) won't pass CI.

Bug: T368921
Change-Id: Ia23138114030b44e72ecd89edc73ee565f1fba39
2024-07-18 17:04:14 +00:00
jenkins-bot
e45a067a5a Merge "Document optional parameters in .js code as optional" 2024-07-18 14:34:30 +00:00
jenkins-bot
d608e69b57 Merge "Deprecate wfMergeErrorArrays()" 2024-07-18 14:17:56 +00:00
jenkins-bot
52918eee75 Merge "SpecialImport: Convert to use Authority" 2024-07-18 14:17:49 +00:00
jenkins-bot
7ccce2a6f4 Merge "Add an error message for invalid IPs passed to the REST API" 2024-07-18 13:47:46 +00:00
thiemowmde
b0d3ebe311 Document optional parameters in .js code as optional
Without the square brackets my IDE keeps telling me that calls to
these methods are wrong because they wouldn't use the correct number
of arguments. But this is not true.

Change-Id: I58a19529c665bb5c98ac301d357a49ca7f710b5c
2024-07-18 15:40:35 +02:00
Bartosz Dziewoński
9b8b99911e Deprecate wfMergeErrorArrays()
No longer used anywhere.

Change-Id: Id764fa47ab57875e99fee7d8b87d009cde73ea52
2024-07-18 13:33:56 +00:00
Bartosz Dziewoński
4e0f265285 SpecialImport: Convert to use Authority
Authority::isDefinitelyAllowed() offers a slightly better way to
check that the user has one of the two rights, and isn't blocked,
but without checking permissions for specific page titles.
That is what was intended when this complicated check was added
in 33534edfbd (SVN r85005).

Change-Id: I5eab9706f4bce92648076a45deef0ae0137c1151
2024-07-18 13:33:46 +00:00
thiemowmde
d28a36fb42 Remove unused @dataProvider from TitleValueTest
This mistake happened in If455682. It's a bit funny. There are two
providers that are 100% identical anyway. The old provider was copied
but the new test accidentally uses the old provider. Which is totally
fine. They are identical anyway.

Change-Id: I473a96769f700a0f601dce16a86b1dc4ff8f4297
2024-07-18 15:23:00 +02:00
thiemowmde
75e9cbf5ca Stop using LBFactory in UserEditCountInitJobTest
I believe almost all other code was already updated to use the much
more narrow ConnectionProvider instead. I believe this was just
forgotten.

Change-Id: I07ef12bed522eea263806b09c9b4c8cb56723334
2024-07-18 15:20:12 +02:00
jenkins-bot
5d90625531 Merge "logging: Use getPage() instead of getTitle()" 2024-07-18 12:21:31 +00:00
STran
4f22540d05 Add an error message for invalid IPs passed to the REST API
If an invalid IP is passed to the REST API, the error message
should reflect that an IP was expected. Current rest errors only
support usernames.

Change-Id: Iea937e33c1a2534cc9a53c710d7ed7104b2d6a32
2024-07-18 03:15:35 -07:00
Lucas Werkmeister
fb760c66c5 MoveLogFormatter::getPreloadTitles: Handle bad titles
If the namespace configuration changed, it’s possible that the title in
the params can no longer be parsed. In that case, we shouldn’t return a
null entry, but just an empty array instead. (I haven’t tried it out
locally, but the test suggests that the actual formatting of the row
works without issue, with the title being shown as Special:BadTitle.)

Bug: T370396
Change-Id: I6335e12efa518332f7cd2268a833f8b60b8e6abe
2024-07-18 11:49:33 +02:00
Kosta Harlan
3bcc55efde DevelopmentSettings: Enable auto creation of temp users in CI
Why:

- Temporary accounts will become the default anonymous editing
  paradigm on Wikimedia wikis (and maybe for MediaWiki via T355880),
  so we want this to be the default that we test against in CI

What:

- Enable AutoCreateTempUser in DevelopmentSettings.php when
  MW_QUIBBLE_CI is set. That means it will be enabled for CI, but not
  by default, in local development setups that include
  DevelopmentSettings.php

Notes:

- PHPUnit tests that need to run in an anonymous IP editing context
  should use TempUserTestTrait::disableAutoCreateTempUser()
- Selenium and API-testing tests that specifically check anonymous
  IP editing context should use a custom LocalSettings.php override
  to disable temp accounts feature for the duration of the test

Bug: T359043
Depends-On: I375cf7dfec1667396136402a85cbbb68efd43069
Depends-On: If48a33794132b46fb51d864bce103aa8285443c3
Depends-On: I604c521f00d5cc64b8102c93f9a013bcac557001
Depends-On: Id6ec4b9e438dd277a51f781377a93756fa4c3996
Depends-On: Ib0a176fe335cf45e5b2cdd351c95d5da162a1eb2
Change-Id: I8c4395ac1bdbc0c55aa45038cbbd589025b4aeef
2024-07-18 07:55:41 +00:00
Translation updater bot
bb002cd6e1
Localisation updates from https://translatewiki.net.
Change-Id: I39ba128dded23e76e697d8850fde30e1edab1824
2024-07-18 09:04:40 +02:00
Amir E. Aharoni
fbdfae31b0 Add Nupe language (nup)
MessagesNup.php will be added later when we have namespaces.

Bug: T370123
Change-Id: I2504d4005a5a706448a0f784d38987e693254bbe
2024-07-17 18:51:37 -04:00
jenkins-bot
2ce1021941 Merge "exception: Avoid raw \n in HttpError" 2024-07-17 20:09:11 +00:00
jenkins-bot
1ad99a04a4 Merge "language: Widen @covers for some MessageTest cases" 2024-07-17 18:09:33 +00:00
jenkins-bot
4469bb3b05 Merge "EditPage: refactor to create generateUndoEditSummary()" 2024-07-17 15:43:13 +00:00
jenkins-bot
d1f26531d8 Merge "specials: Build mungedQuery with default protocol on Special:LinkSearch" 2024-07-17 15:37:04 +00:00
jenkins-bot
3cf57d160d Merge "selenium: Example code for Selenium/Getting Started/Create a simple test" 2024-07-17 14:13:12 +00:00
jenkins-bot
b65f2f5232 Merge "Add ArrayDef convenience methods for JSON Schema generation" 2024-07-17 12:11:31 +00:00
jenkins-bot
564188e81d Merge "ComposerLaunchParallel: Use Shellbox" 2024-07-17 11:04:45 +00:00
jenkins-bot
78cd3f33cc Merge "Add phpunit:parallel:extensions composer command" 2024-07-17 11:04:36 +00:00
jenkins-bot
e6127d166c Merge "Add phpunit:prepare-parallel:extensions command" 2024-07-17 10:49:43 +00:00
Lucas Werkmeister
acd98533ec ComposerLaunchParallel: Use Shellbox
Make it clearer in the class documentation that we can’t use most
MediaWiki services, including Shell::command(); that said, as far as I
can tell we should be able to use Shellbox (as it’s a separate library),
so do that.

Change-Id: I73f29214a1527bbbd3fd5c22b7476bdaa4627b03
2024-07-17 10:33:07 +00:00
Arthur Taylor
8610cf554d Add phpunit:parallel:extensions composer command
In T361190 and Quibble 1.9.0, we introduced parallel execution of
PHPUnit tests to speed up the CI jobs. The existing implementation
is purely Python/Quibble, and cannot directly be used by developers
locally. With this patch, we re-implement the parallel test
execution already implemented in CI as a composer task so that the
parallel tests can be run locally.

The `phpunit:parallel:extensions` command expects to be run after
`phpunit:prepare-parallel:extensions`, and expects to find 8 test
suites with the names `split_group_X` (for X in 0 through 7) in the
PHPUnit configuration file. 8 here is currently a hard-coded number
that corresponds to the number of parallel test executions we need
to saturate the CPU of a 4-core developer machine, and experimentally
leads to a good speed-up versus the serial execution.

When this command runs, it forks to launch 8 parallel processes,
each running one of the `split_group_X` suites. The parent process
waits for the children to complete, buffers the output, collects the
exit statuses, then dumps the buffered output and exits with a
non-zero status if any of the child processes failed (i.e. if there
were test failures).

We introduce `phpunit:prepare-parallel:default` as a complement to
`phpunit:prepare-parallel:extensions`, and the two commands
`phpunit:parallel:database` and `phpunit:parallel:databaseless`.
This creates four possible combinations - two different test suites,
and two different test groups. This is a similar setup to that which
we have in CI - the Database and non-Database tests are run in
separate groups, and some jobs use the `extensions` suite while
others just use the default suite.

The `phpunit:parallel:...` commands will fail with a helpful message
if no `split_group_`s are found in the active PHPUnit configuration.

To help test whether the split test runs are really running all the
tests in the suite, we generate and store the PHPUnit results cache
file. Comparing the results cache files from linear versus parallel
runs should tell us if all the tests have been executed.

Bug: T365976
Change-Id: If106802f08edd5d4c841bb7970c69b88ab3bb39b
2024-07-17 12:32:35 +02:00
jenkins-bot
6e48a6eed8 Merge "EditPage: improve variable names" 2024-07-17 10:28:43 +00:00
Željko Filipin
911957a415 selenium: Example code for Selenium/Getting Started/Create a simple test
https://www.mediawiki.org/wiki/Selenium/Getting_Started/Create_a_simple_test

Bug: T364268
Change-Id: I577fe4d49cc10bec11fc4514b1b8f090621d1d07
2024-07-17 11:36:43 +02:00
jenkins-bot
08d30cc5ca Merge "selenium: Add sample code from Selenium documentation to mediawiki core" 2024-07-17 09:06:04 +00:00
Novem Linguae
5d8e537644 EditPage: refactor to create generateUndoEditSummary()
This code was in a big method and had a single responsibility
so was a good candidate for extracting into its own private
method

- Cut and paste a big block of code
- Move `$disableAnonTalk = $services->getMainConfig()->get( MainConfigNames::DisableAnonTalk );`
into the new method
- Add docblock
- Change #comment to //comment in the new method, for consistency within the new method
- No-op

Change-Id: I379bfa67a4518ca46da482578271471fa43ea4e2
2024-07-17 00:35:01 -07:00
Novem Linguae
2a763ca81d EditPage: improve variable names
- rename $def_content to $defaultContent
- rename $popts to $parserOptions
- remove some line breaks

Change-Id: I497c703652b094d5a69d71558037a2cc0b6683fd
2024-07-17 00:08:05 -07:00
Translation updater bot
c78f85ba3d
Localisation updates from https://translatewiki.net.
Change-Id: I776151944e8ab9a77c9cc2da87e1b92a5bf29d7b
2024-07-17 09:04:28 +02:00
Jon Robson
e977eea153 Support mask-image in ResourceLoader ImageModule
The feature would be opt in to retain backwards compatible
support while also moving closer to rendering icons
consistently with how Codex does.

An example of this in use are:
* Ie5c88e0aa243f73f2dc9f310d18fd59b831edc64
* I17fabdf276f6c33fb78c007d75cda6bb9e02d79b

Bug: T365764
Bug: T358246
Change-Id: I95caab8037ccceba73101da2eb3c601f39511377
2024-07-17 01:05:06 +00:00
jenkins-bot
0866d5e2a0 Merge "ContributionsSpecialPage: Allow some messages to be customizable" 2024-07-16 20:41:27 +00:00
jenkins-bot
938202a385 Merge "ContributionsSpecialPage: Add @inheritDoc for overridden method" 2024-07-16 20:41:21 +00:00
Umherirrender
08f758e29a exception: Avoid raw \n in HttpError
Follow-Up: Id8360ff3ca6dbe7b78e30194fde292763479cb21
Change-Id: I9f5b8544a0a12d7ad394712106c08f7ca52afee8
2024-07-16 21:39:19 +02:00
Umherirrender
6da5ac4b2a specials: Build mungedQuery with default protocol on Special:LinkSearch
When no protocol is given, assume https:// and http://,
for the munged query part this was broken since e4078e9940

Bug: T369813
Follow-Up: I123662f40f6efbfd24f280984cd824ced6892840
Change-Id: I0d1bbb36c5d3deb98d45055bff32f7616bce9d5c
2024-07-16 21:24:23 +02:00
Jon Robson
09f0f2c1b1 Linker: Do not use deprecated @color--base--subtle token
Bug: T363878
Change-Id: I18b7cf74323441f6342d8cb6ad88b9757ed3488b
2024-07-16 18:17:35 +00:00