Commit graph

126328 commits

Author SHA1 Message Date
Umherirrender
0a69e0bc53 tests: Use const for some static data in test files
Change-Id: Id7ccd48e3bf626095e2d3929831b5d87ed0be948
2024-09-01 23:24:11 +02:00
jenkins-bot
a6c216ad8d Merge "exception: Use const for MWExceptionHandler::$fatalErrorTypes" 2024-09-01 17:43:40 +00:00
jenkins-bot
451ac0891b Merge "filerepo: Remove unused LocalFileMoveBatch::$archive" 2024-09-01 17:07:13 +00:00
jenkins-bot
53936dc79c Merge "utils: Add missing documentation to class properties" 2024-09-01 15:19:10 +00:00
jenkins-bot
83be286ed6 Merge "utils: Remove unused ZipDirectoryReader::$data class property" 2024-09-01 15:13:48 +00:00
Umherirrender
574e8b702c utils: Add missing documentation to class properties
Add doc-typehints to class properties found by the PropertyDocumentation
sniff to improve the documentation.

Once the sniff is enabled it avoids that new code is missing type
declarations. This is focused on documentation and does not change code.

Improve a mixed type to string

Change-Id: Id994553eaeac181775ac782423ff53928ad45466
2024-09-01 14:40:01 +00:00
jenkins-bot
104e1c05c8 Merge "filerepo: Add missing documentation to class properties" 2024-09-01 13:42:26 +00:00
jenkins-bot
811e4f2785 Merge "auth: Add missing documentation to class properties" 2024-09-01 13:31:02 +00:00
Umherirrender
20dadba5be filerepo: Add missing documentation to class properties
Add doc-typehints to class properties found by the PropertyDocumentation
sniff to improve the documentation.

Once the sniff is enabled it avoids that new code is missing type
declarations. This is focused on documentation and does not change code.

Change-Id: Ifbc2ce0c68865c5d32689e56c6215a5099f7478b
2024-09-01 12:09:37 +00:00
Umherirrender
3a09698763 utils: Remove unused ZipDirectoryReader::$data class property
Unused since addition of class property in 6906724935 (r100779)
Unused since dynamic creation in 0a21e2de12 (r82783)

Change-Id: I72c7dab67ef12d229fb232311e404467260d742d
2024-09-01 12:07:08 +00:00
Umherirrender
c9a4f4c9c5 filerepo: Remove unused LocalFileMoveBatch::$archive
Unused since the addition in 8d85629c58 (r34169)

Change-Id: Id08ee260e320d8c97c2c3576d998af1b70952f27
2024-09-01 14:00:13 +02:00
Umherirrender
31c1011105 exception: Use const for MWExceptionHandler::$fatalErrorTypes
Also remove @var from const, the type is given by the value of the const
and does not need documentation.

Change-Id: I65636f2b97b44387c4320ebfb4be6c81d6f771b9
2024-09-01 13:24:03 +02:00
jenkins-bot
d1c03580c5 Merge "title: Use const for NamespaceInfo::$alwaysCapitalizedNamespaces" 2024-09-01 11:11:05 +00:00
Umherirrender
e95bfeae60 title: Use const for NamespaceInfo::$alwaysCapitalizedNamespaces
Change-Id: I29bc609c5148668e533a9ed9f72b29f780f00dba
2024-09-01 12:06:28 +02:00
Umherirrender
e44aee1f74 auth: Add missing documentation to class properties
Add doc-typehints to class properties found by the PropertyDocumentation
sniff to improve the documentation.

Once the sniff is enabled it avoids that new code is missing type
declarations. This is focused on documentation and does not change code.

Change-Id: Ib6081f5519d2294bb14f81bf399f9c45315f2b69
2024-09-01 11:27:45 +02:00
Umherirrender
7bee34c99d Permissions: Avoid assignment in condition in PermissionManager
Change-Id: I7a9b5c89129fe4b555d03861f2c3ce3e9e2b2446
2024-09-01 00:03:29 +02:00
jenkins-bot
684496b621 Merge "Message: Add more tests for serialization and unserialization" 2024-08-30 22:13:07 +00:00
jenkins-bot
f4d75a2ee3 Merge "CodexModule: Fix double-flipping in RTL" 2024-08-30 22:10:26 +00:00
Bartosz Dziewoński
087e676cea Message: Add more tests for serialization and unserialization
Bug: T373719
Change-Id: I153b9ba9edf67d940ef6c7b1ab1fe9f806e534d7
2024-08-30 17:47:33 -04:00
jenkins-bot
9ba29602e7 Merge "tests: Remove deprecated MediaWikiIntegrationTestCase::addCoreDBData" 2024-08-30 21:38:53 +00:00
jenkins-bot
332310d7a1 Merge "maintenance: Replace deprecated Maintenance::$mOptions" 2024-08-30 21:32:39 +00:00
jenkins-bot
9e9aeb9926 Merge "i18n: Use "Don't" over "Do not" in tog-diffonly" 2024-08-30 21:17:51 +00:00
jenkins-bot
750aa11700 Merge "Start on tests for install.php" 2024-08-30 20:17:55 +00:00
jenkins-bot
c188ff067e Merge "Fully test createBotPassword.php" 2024-08-30 20:17:48 +00:00
jenkins-bot
614c47f905 Merge "Test deleteOrphanedRevisions.php" 2024-08-30 20:14:38 +00:00
jenkins-bot
b40cef955f Merge "Test dumpRev.php" 2024-08-30 20:14:29 +00:00
jenkins-bot
7eaeffdbfe Merge "Test fixUserRegistration.php" 2024-08-30 20:14:20 +00:00
jenkins-bot
5984c36efd Merge "Start on tests for renameUser.php" 2024-08-30 20:14:09 +00:00
jenkins-bot
5fa154cce9 Merge "Start on tests for resetAuthenticationThrottle.php" 2024-08-30 20:14:02 +00:00
Roan Kattouw
c13dbc8a93 CodexModule: Fix double-flipping in RTL
CodexModule::processStyle() looks at the path of the style file to
detect whether it's an already-flipped Codex file. In
I11c6a81a1ba34fe10f4b1c98bf76f0db40c1ce98 we broke this logic so that it
was comparing a full path (prefixed with MW_INSTALL_PATH) to a relative
path (not prefixed), so the detection always failed and we'd flip every
file. For Codex files, this meant we double-flipped the RTL files back
to LTR.

Follow-Up: I11c6a81a1ba34fe10f4b1c98bf76f0db40c1ce98
Bug: T373676
Change-Id: I49f14dcc503a3279362559197f12b2852276fb5e
2024-08-30 13:13:00 -07:00
Dreamy Jazz
bcb2112850 Start on tests for install.php
Why:
* Maintenance scripts in core are mostly untested and testing them
  will help to avoid regressions.

What:
* Create CommandLineInstallerTest.

Bug: T371167
Change-Id: Ia9ef03326d7c25b7eb310c191034932fffcbff8c
2024-08-30 19:44:52 +00:00
Dreamy Jazz
a805898fa1 Fully test createBotPassword.php
Why:
* Maintenance scripts in core have low test coverage
* Improving this will reduce the chances of regressions and bugs

What:
* Create CreateBotPasswordTest which fully tests
  createBotPassword.php maintenance script.
* While doing this, address a PHP warning that appears when the
  user does not specify the 'grants' option.

Bug: T371167
Change-Id: I8256c278b8397de896906e5714d478883b518ba0
2024-08-30 19:18:23 +01:00
Dreamy Jazz
0a89e2b019 Test deleteOrphanedRevisions.php
Why:
* Maintenance scripts in core have a low percentage of test coverage
* Testing these scripts helps avoid regressions and bugs

What:
* Create DeleteOrphanedRevisionsTest which fully tests the
  maintenance script.

Bug: T371167
Change-Id: I759a9203c52fd00cdeb5effe38f01190dec1fc80
2024-08-30 18:07:43 +00:00
jenkins-bot
618c745106 Merge "Fix vertical align of collapsibleFooter toggle across skins" 2024-08-30 17:56:06 +00:00
Dreamy Jazz
cf089f77ff Test dumpRev.php
Why:
* Maintenance scripts in core have poor test coverage
* Improving this coverage will help reduce the chances of bugs
  and regressions.

What:
* Create DumpRevTest which mostly covers dumpRev.php

Bug: T371167
Change-Id: I0707bd92abb8b39e257b97aafdadef6bc600bee2
2024-08-30 16:59:00 +00:00
Dreamy Jazz
05c7a34fa6 Test fixUserRegistration.php
Why:
* Maintenance scripts in core are mostly untested and testing them
  will help to avoid regressions.

What:
* Create FixUserRegistrationTest that fully tests the associated
  maintenance script.

Bug: T371167
Change-Id: Ifb3594f7dc0055568431002a9180df7db4da9692
2024-08-30 17:39:11 +01:00
Dreamy Jazz
3bcf2cae8c Start on tests for renameUser.php
Why:
* Maintenance scripts in core have low test coverage, and
  increasing the test coverage will help avoid regressions and
  bugs.

What:
* Create RenameUserTest which tests the renameUser.php
  maintenance script for when invalid arguments are provided.

Bug: T371167
Change-Id: I778f45e74708d1ad25b8bda918f5c3ca03e4668d
2024-08-30 16:35:30 +00:00
Dreamy Jazz
62943e496f Start on tests for resetAuthenticationThrottle.php
Why:
* Maintenance scripts in core have low test coverage, and testing
  them is important to avoid regressions and bugs.

What:
* Create ResetAuthenticationThrottleTest which tests the script
  for invalid or missing options, as well as resetting the
  throttles for temporary account creation and name acquiration.

Bug: T371167
Change-Id: Ied9619f12f3f41040b1837e0923f8c7fb345175c
2024-08-30 16:35:24 +00:00
Ebrahim Byagowi
dad6613ff0 Fix vertical align of collapsibleFooter toggle across skins
Different skins have different values for <p>'s spacing making toggle
arrow hard to vertically align correctly with heading paragraph, this
resets it to the symmetric spacing of Vector-2010.

Admittedly this isn't that clean solution but the other solution
would be more intervention on the PHP and also LivePreview side,
turning parseAsBlock() to parse() and taking care of Wikibase
which can't be done in rush so let's have a temporarily fix
at least for now.

Bug: T373658
Change-Id: Ie0d8014d7716b11f04c7b0de782b8ce1d15ff0f7
2024-08-30 19:18:18 +03:30
jenkins-bot
b5a1f97c2e Merge "Revision,Storage: Widen @covers tags in tests" 2024-08-30 12:08:24 +00:00
jenkins-bot
d7a2a2bf56 Merge "recentchanges: Move rcfeed/ to includes/recentchanges/RCFeed/" 2024-08-30 09:03:43 +00:00
Translation updater bot
d23abdc88d
Localisation updates from https://translatewiki.net.
Change-Id: I2ae92158d62ee51967518a9bf2eca32cb45fa43b
2024-08-30 09:01:05 +02:00
Timo Tijhof
311b2d0e98 Revision,Storage: Widen @covers tags in tests
> Given all called same-class methods are de-facto and liberally claimed,
> and that we keep the coverage limited to the subject class, it maintains
> the spirit and intent by listing the class as a whole instead.
>
> PHPUnit offers a more precise tool when you need it (i.e. when testing
> legacy monster/god classes), but for well-written code, the
> class-wide tag is exactly what you want.
>
> We lose useful coverage and waste valuable time on keeping tags
> accurate through refactors, especially private functions (or worse,
> forget to update it).
> Tracking tiny per-method details wastes time in realizing (and
> fixing) when people inevitably don't keep them in sync, and time
> lost in finding uncovered code to write tests to realize it was
> already covered but "not yet claimed".

Ref https://gerrit.wikimedia.org/r/q/owner:Krinkle+is:merged+message:Widen

Change-Id: If90fc5285a067ec8f706d87b2ba1ae85020e2ba0
2024-08-30 04:23:11 +00:00
jenkins-bot
ceeae9b74b Merge "rdbms: remove deprecated MaintainableDBConnRef class" 2024-08-30 01:49:13 +00:00
jenkins-bot
f8d7dbef37 Merge "rdbms: only mention write queries in "writes pending" warnings" 2024-08-30 01:32:06 +00:00
jenkins-bot
b41d85c371 Merge "rdbms: add nullity safety check to DBConnRef::ensureConnection()" 2024-08-30 01:31:58 +00:00
jenkins-bot
74fe73097c Merge "rdbms: rename and reorganize some TransactionManager helper methods" 2024-08-30 01:31:51 +00:00
jenkins-bot
ea42edfe29 Merge "RenameUser: Make RenameUserJob use commitAndWaitForReplication()" 2024-08-30 01:24:02 +00:00
Aaron Schulz
3833d2d3d3 rdbms: remove deprecated MaintainableDBConnRef class
Bug: T373655
Change-Id: I1d1ccb862d4356af146ee39f0fd4081acd82a9ce
2024-08-30 01:19:51 +00:00
jenkins-bot
c88a79d45c Merge "rdbms: clarify comment in DatabaseFactory::create() and rename helper method" 2024-08-30 01:09:06 +00:00