Commit graph

1556 commits

Author SHA1 Message Date
jenkins-bot
93b98cfc5b Merge "Don't reconstruct formatting elements in figures" 2022-08-31 23:22:33 +00:00
Arlo Breault
4703724fe8 Don't reconstruct formatting elements in figures
Similar to I3c55eb5fb8055016f8c4f76d27d953f65ff621be in Parsoid

Bug: T314059
Change-Id: I7b4e9df8490357f44d31d6a869fa9b7a15f029ea
2022-08-31 18:55:23 -04:00
Fomafix
b50aa1a47d Add 'zh-classical' to the test cases for isWellFormedLanguageTag
This shows that 'zh-classical' is not even a well-formed language tag
because 'classical' has more than 8 characters.

Change-Id: Ic07baf98ca4d92fa4c196895533650145c440584
2022-08-31 20:15:00 +00:00
Kunal Mehta
499a1fe497 rdbms: Move Database::factory() to DatabaseFactory service
We also bring along Database::attributesFromType(), which relied on the
private ::getClass(). This requires us to inject DatabaseFactory through
the LBFactory/LoadBalancer hierarchy.

Database::factory() is now soft deprecated. All callers outside of
includes/installer/ still need migration.

Bug: T299691
Bug: T315270
Change-Id: I7d057a9438f1b097554679975e4e9b2fc99e7c2b
2022-08-31 10:53:50 +10:00
Fomafix
233677a9a5 Move isWellFormedLanguageTag from Language to LanguageCode
The static function isWellFormedLanguageTag is related to BCP 47
language codes not to the internal language codes or language names.

The new function LanguageCode::isWellFormedLanguageTag uses type hints.
THe explicit type cast (bool) is not necessary anymore.

The old function Language::isWellFormedLanguageTag is now deprecated.

Change-Id: I6431dbd82ed6dfcc2a7c3495eca025506551db05
2022-08-30 11:39:26 +00:00
Aaron Schulz
a58e677f91 parsoid: inject UrlUtils to avoid phpunit failures in SiteConfigTest
Previously, prior changes to the global UrlUtils instance could interfere
with testInterWikiMap() and trigger a BadMethodCallException exception in
UrlUtils::expand().

Bug: T297078
Change-Id: If75a91e33c5881244de388d203d0fc4879000f46
2022-08-26 23:39:57 +00:00
jenkins-bot
94d71c83c1 Merge "Replace trivial usages of code in strings with concatenation" 2022-08-26 16:54:56 +00:00
Thiemo Kreuz
67c56155c7 Replace trivial usages of code in strings with concatenation
This is really hard to read. What is code, what is string? These
places are so simple, they really don't need the "{$var}" syntax.

Change-Id: I589dedb8c0193eec4eef500bbb896b5b790b727b
2022-08-26 12:26:44 +00:00
Michał Turek
1d87b8e7b3 Sanitizer: Don't consider inline var CSS insecure
Since (T208881) "CSS using var() to create exponential sized calc() on wiki page will crash visitor's browser" was fixed by disabling var in inline CSS, the issue with browser crashes appears to have been fixed in Firefox, Chrome, modern Edge, and Opera.
This change reverts T208881.

Bug: T288201
Change-Id: I387a0e9fdd02faa69616890c613462c83b91b789
2022-08-24 07:17:28 +00:00
jenkins-bot
7efe7727a0 Merge "Setup: Remove internal short-cut config $wgUseEnotif" 2022-08-20 14:53:43 +00:00
jenkins-bot
b8a0820ddf Merge "Use ::class to refer to class names" 2022-08-18 16:02:30 +00:00
Umherirrender
9b8f153fb8 Setup: Remove internal short-cut config $wgUseEnotif
It is not possible to set $wgUseEnotif on LocalSettings.php,
because it is always set on setup, it should not be a global/setting.
Just remove it from the dynamic setup and use the config it is set from

Bug: T305093
Change-Id: I9bfa502a0b9798bd149b4cfe4db86a0461e76f55
2022-08-17 23:41:30 +02:00
Umherirrender
5c2315fdf6 Use ::class to refer to class names
Change-Id: Icc511e48a0601224729365cde5636691ec5ca826
2022-08-17 22:59:17 +02:00
Umherirrender
167fb2a979 unit tests: Use MainConfigNames constant to refer configs
When creating ServiceOptions objects or fake HashConfigs use the
constant to refer the config name

Change-Id: I59a29f25b76e896c07e82156c6cc4494f98e64cc
2022-08-17 22:33:58 +02:00
jenkins-bot
898f9393dc Merge "Use native array_column() in tests instead of loops" 2022-08-16 19:44:54 +00:00
Thiemo Kreuz
68ec2661d2 Use native array_column() in tests instead of loops
It's just a nice, lesser known convenience function. Exists since
PHP 5.5.

The changes to SerializationTestTrait ended being a little different.
Original I tried to use array_column() as well. But it drops the
array keys, which is relevant here.

We found that calling the two methods getTestInstances(AndAssertions)
multiple times is quite expensive and should be avoided. I changed
the code slightly so it's much less likely this is done unintentionally.

Change-Id: Ifaba3c370871a7c97b4d81ec21ff6ec134433fc0
2022-08-16 15:41:14 +02:00
C. Scott Ananian
0b10563895 parser: Use a <meta> tag for the internal TOC_PLACEHOLDER
Split out from the I44045b3b9e78e change.

This is consistent with what Parsoid will use for the TOC marker.

Bug: T287767
Bug: T270199
Bug: T311502
Depends-On: I1f607cf1ef1b61fb4d2e1880de756fb94d5a6b22
Change-Id: Ie63eed07b9bca1bfa07d4c256aba3728cedd8f93
2022-08-16 06:05:17 +00:00
jenkins-bot
a75de5ee61 Merge "Remove confusing ->onlyMethods( [] ) with empty array from tests" 2022-08-14 23:45:26 +00:00
jenkins-bot
66d786df0c Merge "Inline a few more trivial createMock() calls in tests" 2022-08-11 23:23:47 +00:00
Amir Sarabadani
8614e30638 rdbms: Stop accepting live connection in DBConnRef constructor
This just makes the class overly complex and defies the whole point of
having this class in the first place (=delaying getting db connections).

It makes it harder to read and understand and specially polymorphic
arguments are quite confusing.

It also would break the reloading db on the fly (I6c3ffde62f6e), users
of DBConnectionRef should not know about the underlying connection, this
class is trying encpsulate that and accepting connection in constructor
breaks this encapsulation.

Bug: T298485
Depends-On: I951ab99ae766788dbae8bd338aaae114a388b21f
Change-Id: I743c0565504c65c4dedf29f2a36d4c386601fda0
2022-08-08 18:11:31 +02:00
Thiemo Kreuz
02971ace54 Remove confusing ->onlyMethods( [] ) with empty array from tests
Calling ->onlyMethods( [] ) with an empty array does have an effect.
By default, all methods are mocked, which means the original code is
not called. Calling ->onlyMethods( [] ) turns this around. No methods
are mocked but all call the original code.

This is almost the same as ->enableProxyingToOriginalMethods(). The
difference is that ->enableProxyingToOriginalMethods() also requires
the original constructor to be called, but ->onlyMethods( [] ) does
not.

We can get rid of this confusing setup in tests that don't need it.
All tests in this patch that succeed with a simple ->createMock()
just demonstrated that they don't need it.

Change-Id: I341323a1ca793c039498f80b7f073c124b6b6ae0
2022-08-08 15:49:59 +02:00
Amir Sarabadani
2eb242f40a rdbms: Drastically simplify Sqlite db tests
Now that we moved considerable chunk of DatabaseSqlite to
SqlitePlatform, it's easier to mock and test without actually needing a
live db connection.

This allows moving a lot of tests from integration to unit tests making
them much faster.

Change-Id: I8ce7c470abed5144ba456a000c733e5d739c5c4e
2022-08-08 14:38:20 +02:00
Thiemo Kreuz
9e6e3f8d08 Inline a few more trivial createMock() calls in tests
createMock() is still relatively new. This code was using more
complicated mock builders before. This was changed just recently.
createMock() is now so short, the extra helper methods don't make
the code more readable, I would argue.

Change-Id: Ia7e24827157d5f49fc7da102418c79ae33c8e053
2022-08-08 09:50:50 +02:00
jenkins-bot
2f5ca86fac Merge "DerivativeContext: Create WikiPage from derivated title" 2022-08-06 22:05:06 +00:00
jenkins-bot
4a9863c0a6 Merge "Allow DB config to be reloaded on the fly" 2022-08-06 19:51:41 +00:00
Thiemo Kreuz
e5d8bd29e6 tests: Remove non-existing method arguments from revision-related tests
Change-Id: Ie7b12fddd58617c7af7c569bf6208709bb730dbd
2022-08-06 10:49:59 +00:00
Thiemo Kreuz
dcbfb538d8 Fix incomplete test case in CorsUtilsTest
There was never anything actually executed in this test.

This patch also removes a little bit of unused code and inlines
trivial test setup code.

Change-Id: I7dd019cac383313913e06adbea22bb6540162280
2022-08-06 09:12:26 +00:00
jenkins-bot
ae8c437491 Merge "search: Replace deprecated User::getOption" 2022-08-06 08:07:54 +00:00
jenkins-bot
9295763fb5 Merge "watcheditem: Replace deprecated User::getOption" 2022-08-06 08:06:26 +00:00
Timo Tijhof
a43ecd9a46 mediawiki.util: Add parentheses to wfUrlencode test cases
Clarify docs and reasoning in the tests.
Add some line breaks.
Consistent comment formatting.
Add "NOTE" in both directions.

This is in prep for an implementation change to the JS version, to
detect/prevent regressions.

Change-Id: Iaae47c040e13dcb55b141e5bc8304e8d140ce04f
2022-08-05 16:30:38 -07:00
Umherirrender
227d4ff702 search: Replace deprecated User::getOption
Bug: T296083
Change-Id: I83e4cca11c9266e93b237ed11c14293a001609dc
2022-08-05 22:31:12 +00:00
Umherirrender
a76ed60462 watcheditem: Replace deprecated User::getOption
Bug: T296083
Change-Id: I703036d64006fed363cbe93040b928287a4530bd
2022-08-05 22:31:09 +00:00
daniel
5b0b54599b Allow DB config to be reloaded on the fly
This introduces $wgLBFactoryConf['configCallback'] which can be set to a
function that returns updates to be applied to $wgLBFactoryConf. The new
method LBFactory::autoreConfigure() can be called to check the callabck
and, if the config changed, reconfigure all existing LoadBalancers.

Reconfiguring the LoadBalancers causes all open connections to be
invalidated; however, any DBConnRef instances will remain valid and will
acquire a fresh connection from the LoadBalancer automatically when
appropriate.

As a proof of concept, this patch adds support for config reloding
into WikiExporter.

Bug: T298485
Change-Id: I6c3ffde62f6e038730736abe980befd90ec43e1a
2022-08-05 17:32:12 +02:00
DannyS712
0ba2d99171 BadFileLookupTest: avoid ' in literals, breaks gitiles highlighting
Shouldn't affect the actual test, just the visual display

Change-Id: I0a9d4466a2aaa4cbf1e64add58ed26f85b3429e5
2022-08-02 22:11:23 +00:00
jenkins-bot
de6cde393d Merge "Don't add $wgExtraNamespaces to $wgCanonicalNamespaceNames" 2022-07-31 02:39:21 +00:00
Lucas Werkmeister
ca37410ace rdbms: Fix capitalization of SQLPlatform references
Change-Id: Ie090f73db9ddf5ea101ed1f0287cc61636817f92
2022-07-29 16:44:31 +02:00
Amir Sarabadani
ac3335d1ac rdbms: Migrate several more Database::do* to SqlPlatform
Bug: T307616
Change-Id: Ie275f487e61736d4a02725256783f80ef38c1cb3
2022-07-29 15:28:23 +02:00
jenkins-bot
f8fd67cbde Merge "rdbms: Migrate SQL analysis code pieces to SQLPlatform" 2022-07-29 08:59:16 +00:00
Máté Szabó
36dd10f9de Migrate use of ${var}-style string interpolation
The "${var}" and "${expr}" style string interpolations are deprecated in
PHP 8.2. Migrate usages in core to "{$var}" as appropriate.

Bug: T314096
Change-Id: I269bad3d4a68c2b251b3e71a066289d4ad9fd496
2022-07-29 02:45:09 +02:00
Amir Sarabadani
4e39f5535a rdbms: Migrate SQL analysis code pieces to SQLPlatform
We really shouldn't do regex matching on SQL we produced, we are better
then that but until we refactor the code to a better shape, it can move
to the platform.

Bug: T307616
Change-Id: Ie2c84f208dfbed036b14c0a0669e004cc84e0f4b
2022-07-28 20:22:00 +02:00
Kevin Israel
1636c24306 Don't add $wgExtraNamespaces to $wgCanonicalNamespaceNames
This fixes a bug experienced by jawiki users in which overriding names
of extension namespaces (e.g. "モジュール・トーク") would unexpectedly
also override extension-provided canonical names (e.g. "Module talk").

Pretty much the only Wikimedia-deployed code that reads the config
variable directly is NamespaceInfo::getCanonicalNamespaces(), which
already takes into account $wgExtraNamespaces, so this should be OK.

Bug: T314013
Change-Id: Icd3405c02886651f8e4ec87f6d66783314c1024b
2022-07-28 08:23:41 -04:00
Timo Tijhof
19dd1a7154 tests: Minor follow-up to MySQLPlatformTest/FileBackendTest php8.1 fixes
Follows I3ea6fb26296f (MySQLPlatformTest):

* Avoid uncertainty and make the code improvable/removable by explaining
  what the suppression is for.

* Remove use of outdated AtEase, which hasn't been used in core tests
  for several months (ref phpcs.xml), and more generally not in new code
  in core or extensions (ref T253461).

Follows I12c17e327628 (FileBackendTest):

* I was going to similarly explain the reason by stating from the linked
  task that it is for preg_match, and I was goingn to move the wholesale
  suppression to just the getMockForAbstractClass() call that constructs
  the FileBackend and thus triggers the issue.

* Instead, I've fixed the constructor to not pass a string there in the first
  place as all non-string values are naturally invalid. Even if there is
  a way to satisfy the regex with a non-string value that casts to a
  valid string, that'd be an invalid value for a FileBackend name as it
  pubicly documented as requiring a string, and internally also stored
  and typed as assumed to be (after validation) a string.

* Change the valid test cases to be more representative of actually
  intended-to-be-valid input, and actually-likely-attempted-but-invalid
  input. The regex permits `[a-zA-Z0-9-_]` yet no numbers, capitals
  or dashes were validated by the test, and no special characters
  rejected by the test.

  This follows If29780653 (c250d07bac) from 2019 which added these test
  cases to improve code coverage without input from any (admitedly,
  non-existent) active maintainers.

Bug: T313663
Change-Id: Ia326e17231a53c7102dcb116817a0c3830c510e4
2022-07-27 18:28:35 -07:00
jenkins-bot
4ae099caa9 Merge "[php8.1] Make WikiImporterFactoryTest use better mock for ImportSource" 2022-07-24 17:56:46 +00:00
jenkins-bot
d1a509a69d Merge "[php8.1] Suppress test warning about providing null" 2022-07-24 17:52:09 +00:00
Brian Wolff
4a2730532a [php8.1] Make WikiImporterFactoryTest use better mock for ImportSource
On php8.1, this test was throwing a warning because readChunk() returned
null, which confused things. Mock out atEnd() method to make it look like
a zero byte stream to avoid the issue

Bug: T313663
Change-Id: I0d7271a07a31dc0cbe6108748d9cabb2c8f04f41
2022-07-24 07:34:10 -07:00
Brian Wolff
c12fad86f4 [php8.1] Suppress test warning about providing null
php 8.1 gives a warning on this case

Bug: T313663
Change-Id: I12c17e32762855e15c8b540422e6110d38a1a6db
2022-07-24 07:04:43 -07:00
Brian Wolff
7fc5ae720b [php8] Suppress warnings for the null test of addIdentifierQuotes
php8.1 throws warnings in this case

Bug: T313663
Change-Id: I3ea6fb26296f2de71619c01752270c58ba5b41e1
2022-07-24 06:55:49 -07:00
jenkins-bot
8fee4d932c Merge "Make HandlerTestTrait compatible with php8.1" 2022-07-23 23:27:30 +00:00
jenkins-bot
78b1fbc3a7 Merge "[php8] Make DeletePageTest stop giving warnings on php8.1" 2022-07-23 23:26:46 +00:00
Brian Wolff
d0bcded731 [php8] Make DeletePageTest stop giving warnings on php8.1
The ->getTitle wasn't mocked, which resulted in a bunch of
warnings about passing null as string.

Bug: T313663
Change-Id: I50c6dd2dcafefd1bb4536d31b2b6005e10dce570
2022-07-23 12:22:19 -07:00
Brian Wolff
1c059e5053 Make ReadOnlyModeTest work in php8.
This was calling wfTmpDir(), which depended on the value
of $wgTmpDirectory being not null, but the parent class of the
test sets the entire environment to null.

Bug: T313663
Change-Id: I37f224195a5aacbd69454cc406fbd06f4e71a133
2022-07-23 19:01:58 +00:00
Brian Wolff
6114f0f1ba Make HandlerTestTrait compatible with php8.1
Cast values to string. This seems to be consistent with what
Router::substPathParams does, and also would be consistent with
the pre php-8.1 behaviour.

Bug: T313663
Change-Id: I631478101b7a679efa7bb897c6c2bb5d51d6281b
2022-07-23 11:58:47 -07:00
jenkins-bot
c82fdbeb25 Merge "rdbms: Migrate delete and update sql building to SQLPlatform" 2022-07-22 16:58:56 +00:00
jenkins-bot
cce65bb4a8 Merge "TitleDefTest: convert to proper integration test; ensure language is 'en'" 2022-07-22 16:12:42 +00:00
Amir Sarabadani
a01a85d58c rdbms: Migrate delete and update sql building to SQLPlatform
Part of breaking down the monster class, Database

Bug: T307616
Change-Id: I89ac3e4ce4b82015eba8f4ccd40cb00938042274
2022-07-22 17:05:13 +02:00
C. Scott Ananian
f817ec9931 TitleDefTest: convert to proper integration test; ensure language is 'en'
This test would fail if the developer's local settings had wgLanguageCode
different from 'en'.  Title parsing depends on a number of services; this
should have been an integration test from the start.

Change-Id: I56160f7385239d71e6ec112a7d900cf1e1212987
2022-07-21 19:32:40 -04:00
Timo Tijhof
3469b11b2c ArrayUtils: Add coverage for consistentHashSort()
This is used by SqlBagOStuff, RedisBagOStuff, and PoolCounterClient.

Bug: T133523
Change-Id: I7cfe49579f0631b1b657b6714a60278ab08a2ca8
2022-07-21 12:23:45 -05:00
DannyS712
756df24990 Tests: remove unneeded helper methods that just return a mock with no
configuration.

Use $this->createMock() directly instead, and reduce some single-use
variables.

Change-Id: I34cee8a67a05593baf18a0322472653c39f37f37
2022-07-20 23:40:19 +00:00
jenkins-bot
8de0be85a4 Merge "Step 1 of renaming sr-ec and sr-el to sr-cyrl and sr-latn" 2022-07-20 22:31:39 +00:00
jenkins-bot
095d0f4605 Merge "EditPage: Disentangle edit summary and section title" 2022-07-19 21:14:32 +00:00
jenkins-bot
b07027f575 Merge "Replace trivial usa of mock builder with createMock() shortcut" 2022-07-19 11:41:12 +00:00
Bartosz Dziewoński
990fd8f0b2 EditPage: Disentangle edit summary and section title
Previously, `$this->summary` was used for two different purposes.
Usually it was just the summary. But when `$this->section` was 'new',
then it was actually the section title most of the time – unless
`$this->sectiontitle` was also set (in which case it took priority),
and until it was replaced by the real edit summary (near the end of
the processing, after copying the section title to the page content
and before saving changes).

Unsurprisingly some of the code didn't handle this duality correctly,
causing T191722 and T311533.

Now `$this->summary` is always the summary, and when `$this->section`
is 'new', then `$this->sectiontitle` is always the new section title.

The only place where this duality remains is in the input attributes
and query parameters, where 'wpSummary' is still used for both the
summary and the section title inputs (only one of them can appear,
depending on whether `$this->section` is 'new'). It would be an
unreasonable backwards-compatibility break to change this, and the
code handling this is somewhat isolated from the rest of the logic.

Bug: T191722
Bug: T311533
Change-Id: I5313ca9a045d112ece390b011a34192220e2abc1
2022-07-19 09:56:05 +00:00
jenkins-bot
626e383da2 Merge "Tests: Use createNoOpMock() shortcut in a few more places" 2022-07-18 21:42:37 +00:00
Thiemo Kreuz
3703b30618 Tests: Use createNoOpMock() shortcut in a few more places
… instead of doing the same manually with anythingBut() and such.

Change-Id: Idb66040d1560a82df9a5bfa2a6c7e20a0649e49c
2022-07-18 21:25:31 +00:00
jenkins-bot
068758ef63 Merge "Tests: Replace trivial willReturnCallback with direct willReturn" 2022-07-18 14:30:54 +00:00
daniel
3f1cf31740 phpunit tests for ParsoidHandler::html2wt
The test cases were mostly ported from tests/api-testing/REST/Transform.js

Change-Id: Ie6b9f28b6e49e44c64f1fa73ca11e21c2b451474
2022-07-18 13:51:49 +02:00
Thiemo Kreuz
58ceac8fc0 Tests: Replace trivial willReturnCallback with direct willReturn
Less setup code, easier to read.

I also found something that looks like it should have been an
assertInstanceOf(), so I made it one.

Change-Id: I7ba9b580c270a103feb0f55b910157f93197fa43
2022-07-18 11:40:09 +02:00
daniel
584287926c RateLimiter: improve test coverage
This adds two tests:
1) ensure that &can-bypass can be used to impose limits on users who are
otherwise exempt from limits.
2) ensure that among multiple limits derived from group membership,
the most permissive one is used.

Change-Id: Iaf9e5d9cc15cbbd3ba117662dd89885ff517580d
2022-07-16 11:00:59 +00:00
Thiemo Kreuz
61ae7504df Replace trivial usa of mock builder with createMock() shortcut
createMock() does the same, but is much easier to read.

A small difference is that some of the replacements made in this
patch didn't use disableOriginalConstructor() before. In case this
was relevant we should see the respective test fail. If not we can
save some CPU cycles and skip these constructors.

Change-Id: Ib98fb06e0fe753b7a53cb087a47e1159515a8ad5
2022-07-15 16:43:48 +00:00
jenkins-bot
f16784cc54 Merge "SettingsBuilder: report warnings" 2022-07-15 12:34:03 +00:00
daniel
cf39a40f16 SettingsBuilder: report warnings
This adds functionality to SettingsBuilder for collecting warnings to be
logged later, when the logging mechanism has been set up.

This also adds a validation step to update.php that aborts the update
if any warnings have been registered in SettingsBuilder, or the settings
fail to validate against the settings schema.

Change-Id: I387905289fb93591f79b96bf4c6cb5ec692b2aff
2022-07-15 12:24:20 +02:00
Tim Starling
cc9af99364 WRStats: Add rate limiter support
Bug: T261744
Change-Id: If3e66491306f22650b31f22ccd60f7d9468316c7
2022-07-15 04:21:33 +00:00
jenkins-bot
68f04bb70a Merge "REST: introduce getPrivateRouteUrl" 2022-07-14 20:42:31 +00:00
daniel
2f8736f1d3 REST: introduce getPrivateRouteUrl
We need a way to determine the URL of routes that are not public,
and should be using $wgInternalServer rather than $wgCanonicalServer.

This patch also refactors some test code to make changes to the
constructor of the Router class less painful.

Bug: T311867
Change-Id: If1878365d019434bb862c643c2350b63479c9844
2022-07-14 13:12:35 +00:00
Thiemo Kreuz
77a3b3f1a0 Make use of PHPUnit fail() shortcut
Change-Id: Id8474e8531fcb526b72511c969728433a9bda9a2
2022-07-14 14:48:15 +02:00
jenkins-bot
9c716f16b5 Merge "MWCryptHashTest: Move into libs directory" 2022-07-13 22:22:25 +00:00
Mark A. Hershberger
b19a827295 Ensure that strlen() does not get passed a (valid) null
Seen in FileBackendGroupIntegrationTest::testGuessMimeInternal().

Bug: T289926
Change-Id: I8bf50d0fc026b2880427d3d75d57e38d4e2989d3
2022-07-12 10:35:39 -04:00
jenkins-bot
3fc9cf4f51 Merge "Add support for write new for templatelinks migration" 2022-07-12 14:17:52 +00:00
Amir Sarabadani
692dde00df Add support for write new for templatelinks migration
- schema change to allow tl_namespace and tl_title being empty
   This is done by removing them from primary key. They don't need to be
   nullable as they have default value.
 - Make sure with WRITE_NEW, updater avoids writing to the old columns

Bug: T306674
Change-Id: I2b8a29043e952060e7a79b6a7a3d647d48cd16fb
2022-07-12 14:46:54 +02:00
Ed Sanders
b0fd96b6bf mw.deflate: Add tests
Change-Id: I5591949a033ba93b61f963c6329cf08b8c8481f1
2022-07-11 17:55:36 +01:00
Fomafix
6839b85994 Step 1 of renaming sr-ec and sr-el to sr-cyrl and sr-latn
The language codes sr-ec and sr-el are not conform to BCP 47.
BCP 47 explicit mentions sr-Latn and sr-Cyrl as examples.

This change adds support for the language codes sr-cyrl and sr-latn
as fallback languages of the language codes sr-ec and sr-el. This
allows to rename the message files and the system messages without
changing the language codes yet.

The next step is to rename the language codes in Translatewiki as
described in https://translatewiki.net/wiki/Renaming_language_codes
Also local system messages in MediaWiki:*/sr-ec and MediaWiki:*/sr-el
can moved to MediaWiki:*/sr-cyrl and MediaWiki:*/sr-latn.

The final step is the change I75da0af35a2066e7963e50c56c99daf1e07c55e6
to complete the rename of the language codes.

Bug: T117845
Change-Id: I666fbdea89ccf21aab6ca1849adf22813dec052e
2022-07-10 21:19:34 +00:00
Kevin Israel
8f3cedbc0a MWCryptHashTest: Move into libs directory
Follows-up 9300bc2933.

Change-Id: I4280011a7ba12c4f0f26e9b6cd954ba2769bbd46
2022-07-10 05:15:54 -04:00
daniel
5e928f39e8 Dynamic defaults: fix $wgLocaltimezone being empty
Apparently, $wgLocaltimezone is set to the empty string in many
existing LocalSettings.php file, presumably because the installer
failed to detect the correct time zone.

The new code for handling automatic defaults will only trigger if
$wgLocaltimezone is null, not when it is otherwise empty.

This adds fallback code in strategic places to ensure that the empty
string is handled correctly.

Bug: T305093
Change-Id: I39226466f2bb6a36823ae9032fc62f981eabc64a
2022-07-09 18:59:32 +02:00
Timo Tijhof
2721c7a1d8 permission: Simplify @covers annotations in PermissionManagerTest
Also remove an unused variable, and convert one provider to generator.

Change-Id: I63e506f30ae334ceff9658c595e64a7e9ada5bbd
2022-07-07 18:22:13 -07:00
jenkins-bot
0f75ef7180 Merge "Use HashConfig to override config variables in phpunit tests" 2022-07-07 05:13:52 +00:00
daniel
ac7138d45b Use HashConfig to override config variables in phpunit tests
This implements config overrides with a HashConfig that is layered on
top of the base config, so we can move away from global variables.

Global variables are still updated using setMwGlobals, for compatibility
with code that is still reading configuration from global variables.

This fixes an issue with the default overrides not being applied to
global variables.

Change-Id: I1922d9b903dcafb83691c2d96790f72747eeef9c
2022-07-07 14:54:06 +10:00
Aryeh Gregor
b72b9a8c43 Move dynamic defaults into MainConfigSchema
The goal is to keep the actual default values for settings in the same
place as the setting is declared, and applied using the regular means
for loading the settings -- not in a separate piece of code that needs
to be loaded through some entirely different mechanism.

SetupDynamicConfig.php now contains a few categories of things:

* Post-processing of configuration settings, where already-set settings
  are altered. This could be moved to MainConfigSchema too as a separate
  set of methods.
* Processing of old aliases of settings (blacklist, slave) that are not
  registered as settings anymore and therefore are not available to
  MainConfigSchema. This could perhaps be moved to LocalSettings
  processing somehow?
* Setting $wgUseEnotif, which is also not registered as a setting.
  Easiest would be just to declare it as a setting and have it set
  unconditionally.
* Setting the actual timezone to $wgLocaltimezone. This is not related
  to configuration and should just be in Setup.php.

Bug: T305093
Change-Id: Ia5c23b52dbbfcb3d07ffcf5d3b7f2d7befba2a26
2022-07-07 09:55:48 +10:00
Lucas Werkmeister
c3c5b6c1b4 Remove 'ignoreKeys' from config schema
Unused since change I88754b52c2 (commit 9e95539fc9) – this was only used
for SessionProviders, which is now a map/object instead.

Change-Id: I8da686e6379eb33a63799874fb44f9b0030ab5ba
2022-07-06 10:46:58 +02:00
jenkins-bot
1f00a8beef Merge "Clarify handling of verifier headers in POST and PUT" 2022-07-05 04:01:04 +00:00
daniel
aad4f8719a Clarify handling of verifier headers in POST and PUT
Besides being used for caching of the responses of GET requests,
the ETag and Last-Modified headers can be used with PUT and POST
requests to control the conditional execution of requests using
the If-Match and If-Unmodified-Since headers.

For that reason it is important to distinguish between the ETag and
modification date of a resource at the time a request is received
(before the resource is modified), and at the time the response is
being sent (after the resource has been modified). The before-state
is used to check conditionals, while the after-state can be sent back
to the client in the response.

For a GET request, it is reasonable to re-use the ETag and Last-Modified
values that were used to check conditionals in the response.
For PUT and POST, that would generally be wrong, since the resource has
since changed.

Bug: T311819
Change-Id: I1a09b0ef35ae2365e0b261fb5295003aec1f5b17
2022-07-05 03:38:45 +00:00
Tim Starling
bcbfc9ccfc Introduce new WRStats library for write-read stats
A library for storage of counter value time series statistics, based
around the observation that memcached getMulti() is apparently fast
enough to do this in a simple manner, with incremented values stored
in time window buckets.

Bug: T310662
Change-Id: I26b1cdba0a06ad16ad8bb71b455e1b6180924d17
2022-07-05 10:35:19 +10:00
Umherirrender
3f47934034 DerivativeContext: Create WikiPage from derivated title
DerivateContext::canUseWikiPage checks the derivated title before
calling the underlying request.
Let getWikiPage also use the derivated title first, before calling the
underlying request to be in sync

This avoids "MWException: RequestContext::getWikiPage called without
Title object set" when the derivated request has a title, but the
underlying request does not.

Bug: T297688
Change-Id: I72f5650986b5a6585dc4909b8fe49e39f60f6a14
2022-07-03 15:53:28 +02:00
jenkins-bot
03e9c864ff Merge "tests: Expand DerivativeContextTest" 2022-07-03 00:21:20 +00:00
Reedy
a3095fbb94 Add return type to jsonSerialize()
Bug: T311919
Change-Id: I469deae973ab58ef41aac6a56cea0653a988c05c
2022-07-02 15:34:02 +00:00
Umherirrender
7949418333 tests: Expand DerivativeContextTest
Add test for the setter/getter of
Authority, Title, WikiPage and ActionName

Move the inital set into the test function, because some setter
resetting other properties and at test time the state is undefinded.

Also move the unconditional call of UserFactory::newFromAuthority into
::getUser to avoid calling MediaWikiServices from the unit tests

Change-Id: Ibf5eca24f056b2ee5388fa121674366424869f11
2022-07-02 14:43:55 +02:00
jenkins-bot
26577ae68c Merge "Support etcd as a source for SettingsLoader" 2022-06-30 16:52:51 +00:00
DannyS712
ab43a98dd6 CreationPermissionConstraintTest: remove unused $title
Follow-up: I12a2f71f52a1ba7e94bf325621e62ed0e255601b
Change-Id: Idb7c9afefb2faea5da61d52fa5ff81bf1522adde
2022-06-29 23:34:57 +00:00
daniel
f2df03704e Add support for nested property schemas in MainConfigSchema.
This adds support for JSONSchema style property declarations with nested
schemas. This is a step towards using more nested structured for
configuration, rather than adding to the over 700 keys already defined
in the main config schema.

Defaults from property schemas are aggregated into a default value in
the top level schema. Descriptions are however not yet aggregated.

Change-Id: Iaf46a9ecc83bee3566098c56137a1be66bff2ab9
2022-06-29 16:34:43 +10:00
Moh'd Khier Abualruz
a7831e4e37 Remove poweredbyico SkinTemplate variable AND SkinGetPoweredBy hook
- poweredbyico removed
- copyrightico removed
- SkinGetPoweredBy, SkinGetPoweredByHook removed
- Release Notes updated

Bug: T306138
Change-Id: I6171b487e1ab0235b81a8a21a1decaf5cfdc4c1c
2022-06-28 22:39:33 +00:00
jenkins-bot
6b57c06bf7 Merge "Storage: Warm parsoid parser cache with parsoid outputs" 2022-06-28 10:00:45 +00:00
Derick Alangi
1854fb02d9 Storage: Warm parsoid parser cache with parsoid outputs
This patch introduces a ParsoidOutputAccess service for
getting parsoid outputs and warms the cache with pregenerated
outputs.

It also introduces a config variable in ParsoidCacheConfig that
is turned off by default for controlling the cache warming.

Bug: T301371
Change-Id: I6152c42ea765d94093d8d62598b1b4278314adec
2022-06-28 09:05:41 +00:00
jenkins-bot
64d9976a66 Merge "REST: Allow weak ETags to match strong ETags." 2022-06-28 05:59:25 +00:00
daniel
39b721667a REST: Allow weak ETags to match strong ETags.
This changes handling of the If-Match header so a weak ETag coming from
the client may match a strong ETag generated by the handler.

This is needed because ETags may get "weakened" on the way to the client
by proxies and middleware, e.g. Varnish applying compression, see
<https://varnish-cache.org/docs/6.0/users-guide/compression.html>.

This behavior is technically a violation of RFC 7232 section 3.1, but it
should actually be safe: A client sending a weak ETag is still ok with
getting a strong match, and a handler that generates a strong ETag knows
that it can rely on strong semantics holding, even if the tag sent by
the client is weak.

Bug: T310710
Bug: T238849
Change-Id: I2a604f2f46719a5f74ddac1b1fa58c8a36910240
2022-06-27 12:52:42 +00:00
Umherirrender
8b1a3d13eb tests: Use WikiPageFactory to create WikiPage object
Bug: T259948
Change-Id: I9afcf3b845306f81ee5ca156553256e6c38df3a0
2022-06-26 23:21:02 +02:00
jenkins-bot
cb91e78024 Merge "Ensure core compatibility with Parsoid external link attributes support" 2022-06-24 23:44:13 +00:00
Isabelle Hurbain-Palatin
61c14054f5 Ensure core compatibility with Parsoid external link attributes support
* Export nofollow and target settings in siteinfo API so that Parsoid's
  developer mode of ApiSiteConfig works.
* Implement SiteConfig::getNoFollowConfig and
  SiteConfig::getExternalLinkTarget, which are defined as abstract
  in the parent class in Parsoid.

Bug: T186241
Change-Id: I6a1f12335be19509d4c5a17e2cae96ecdb677103
2022-06-24 19:12:43 -04:00
DannyS712
50338b1187 Start catch blocks on the same line as the preceding }
Change-Id: Id34892c50f7c02e12683102dcbf66e558527f737
2022-06-23 00:22:35 +00:00
Dan Duvall
4f4c831111 Support etcd as a source for SettingsLoader
Added a EtcdSource to handle loading of settings from etcd. The
implementation is based on EtcdConfig but is much simpler due to
the reliance on the existing source caching layer.

GuzzleHttp\Client is used over MultiHttpClient as the latter depends on
MediaWikiServices and therefore should not be used during early
initialization.

A naive cache key is based on the etcd request URL, effectively
representing the etcd API version and settings directory, and uses
either the DNS SRV entry as the host name or the host name itself if
discovery is disabled.

The cache TTL is set to 10 seconds. The combination of this low TTL and
the naive key should replicate the current caching pattern of
EtcdConfig. Stale results are allowed for failover in case of temporary
unavailability.

At this time, the expiry weight was not changed from the suggested 1.0.
However, verification of this as a suitable early expiration coefficient
should be performed in a production like environment.

Bug: T296771
Change-Id: I782f4ee567a986fd23df1a84aec629e648a29066
2022-06-21 17:17:32 +00:00
jenkins-bot
30fe36a4a6 Merge "Runner: Handle more params in runner." 2022-06-19 12:52:04 +00:00
jenkins-bot
a13ae946fd Merge "Simplify BadFileLookupTest code" 2022-06-19 08:24:47 +00:00
DannyS712
1536436777 Simplify BadFileLookupTest code
Reduce duplication, use createNoOpMock() shortcut, merge
getMockRepoGroupNull() into only caller.

Change-Id: I91f1c33dbfb996df67e3f419206a905ae70aca33
2022-06-18 18:36:28 +00:00
Umherirrender
05a175b439 Simplify assertion for false around wiki id and domain id
false is accepted by Assert::class since 9090085

Change-Id: I243a63dca310a198c6f7a8bc52298c5c95939eb6
2022-06-18 09:49:13 +02:00
Tim Starling
514d941a73 Add structure test for Messages*.php files
* Verify that the fallback chain is not too long
* Add some other obvious tests and fix the files that fail them.

Bug: T310532
Change-Id: I00f3aed35e756a3985f9f16af6d4721e2b61d3f6
2022-06-16 03:09:39 +00:00
daniel
4dd7bd16b5 ParsoidOutputStash: make storage backend configurable.
This introduces the ParsoidOutputStash config setting, which defines the
storage backend and cache duration. The storage backend name refers to
an entry in the ObjectCache setting, and defaults to the main stash.

Bug: T267990
Bug: T309016
Change-Id: Ic67dc43ed9843810e4b180127f9a3bb7608f7608
2022-06-14 14:11:37 +01:00
daniel
18d3ad081d Runner: Handle more params in runner.
This moves the handling for the following parameters fully into the
MaintenanceRunner class:
  --conf, --wiki, --globlas, --memory-limit, --server, --profiler

Change-Id: I63624ba1fcbcf446630eba1b81b2c84b1a943932
2022-06-13 16:10:51 +00:00
jenkins-bot
41fe47cde9 Merge "REST: Hide exception message when wgShowExceptionDetails=false" 2022-06-09 21:51:45 +00:00
jenkins-bot
4e0dbf619a Merge "DiffHistoryBlob: Remove workarounds for old PECL xdiff versions" 2022-06-09 16:14:42 +00:00
jenkins-bot
45f2a4ead2 Merge "DiffHistoryBlob: Don't check for hash PHP extension" 2022-06-09 16:10:06 +00:00
jenkins-bot
264664abeb Merge "rdbms: allow merging IDatabase::upsert() rows with current ones" 2022-06-09 03:13:04 +00:00
jenkins-bot
dadf6b8edd Merge "rdbms: Add multi-statement query support to Database" 2022-06-09 02:38:51 +00:00
Aaron Schulz
fdfe022ccf rdbms: allow merging IDatabase::upsert() rows with current ones
Rewrite the queries so that the column values of conflicted
proposed rows can be referenced in the SET expressions used to
update existing rows. Add IDatabase::buildExcludedValue() to
derive such references.

Make upsert() only use the first key in the unique key list as
the one to use for finding existing rows and merging them. Any
other key will just cause duplicate key errors/rollback upon
row collisions. For example, suppose a `user` table has unique
keys on both UUID and email address. It would be undesirable
for upsert() to clobber an existing `user` row just because
someone tried to make an account with the same email address.

Using upsert() makes sense when the following hold:
- The table has a single unique key that conveys "identity".
  AUTOINCREMENT and UUID columns are particularly good here.
  If row A existed at time t1, row B existed at time t2, and
  both rows have matching values for this "identity key", then
  they are conceptually the "same" row. It does not matter if
  other columns differ or if the row was deleted and recreated.
- Any other unique keys are just business constraints unrelated
  to the concept of identity. For example, an `accounts` table
  might have ID, name, and email address each as unique keys.
- For each proposed row, upsert() looks for an existing row
  that conflicts along the identity key. If there is one, then
  it gets updated, otherwise, the proposed row is inserted.
  Other unique key collisions result in operation rollback.

Bug: T113916
Change-Id: Iddd9f120ee966c76b3acb35e62ea14ec4c6f925d
2022-06-09 11:45:46 +10:00
Aaron Schulz
da9e4b52a5 rdbms: Add multi-statement query support to Database
Add Database::queryMulti(), which will execute an array of
queries as a batch with minimal roundtrips.

SQLite fallbacks to looping through each statement and
invoking doQuery().

Add QueryStatus class to reduce complexity in Database.

Rewrite doQuery() as doSingleStatementQuery().

Change-Id: I3d51083e36ab06fcc1d94558e51b38e106f71bb9
2022-06-09 11:45:38 +10:00
jenkins-bot
988cd29108 Merge "Collect autoloader info in ExtensionProcessor" 2022-06-08 06:11:58 +00:00
daniel
92e8f4e40a Collect autoloader info in ExtensionProcessor
This change cleans up when and how we register autoloader info for
extensions.

This bumps CACHE_VERSION to 8, to avoid issues in case this patch gets
reverted: the new code doesn't copy the map of class files into
$info['globals']['AutoloadClasses']. If old code was to read a new cache
entry, autoloading would fail.

BREAKING CHANGE: The following methods have been removed from
  ExtensionRegistry without deprecation and without replacement.
  They had been introduced in 1.35 for use in the testing framework,
  and were not in use by any known extension:
  - exportAutoloadClassesAndNamespaces
  - exportTestAutoloadClassesAndNamespaces

NOTE: breaks the hack that SocialProfile has in place for T243861.

Bug: T240535
Change-Id: I6e1ceac034c443d9475f1adc1babecddd6af6d05
2022-06-07 17:39:00 +02:00
jenkins-bot
b494330aa7 Merge "ParserCache: always use JSON" 2022-06-07 14:12:29 +00:00
daniel
697f28df32 ParserCache: always use JSON
When JSON support was introduced into ParserCache in 1.36, it was
controlled by a feature flag, $wgParserCacheUseJson. The feature flag
was "born deprecated" in 1.36. It can now be removed.

This means that ParserCache will always store entries as JSON.
Support for reading old non-JSON entries remains intact.
This is needed when updating wikis from a version older than 1.36
to the current version.

Change-Id: Id04e42bfb458d98414bac50e0d6c505e8878e5c0
2022-06-07 15:19:45 +02:00
jenkins-bot
6b53b5df8c Merge "Allow REST API delete method request to contain a body" 2022-06-06 22:50:44 +00:00
DannyS712
69cd8a1126 tests: Remove some unneeded PHPUnit return callbacks
Use willReturnArgument() and willReturn() with a value instead

Change-Id: I878d411a5c6891352cfd16d68cb83254adf3b38b
2022-06-06 02:09:52 +00:00
Reedy
88b3717b68 Tests: Fix some @covers statements
Change-Id: I0e11f3ffefa6bb3f72d96b9101a1950d1c1aa556
2022-06-06 01:02:39 +01:00
Reedy
41c42d5435 Tests: Cleanup some unnecessary nested function calls
Replace ->will( ->return with ->willReturn(

Change-Id: Ia2dfafa03cac8169d86d6fa5a30b73bfad1fe9fa
2022-06-06 01:02:34 +01:00
Bill Pirkle
4ea9ec6654 Allow REST API delete method request to contain a body
Per RFC 7231 (https://www.rfc-editor.org/rfc/rfc7231#section-4.3.5), sending a body
with the DELETE method "has no defined semantics". Allow it, as it is useful for
passing the csrf token required by some authentication methods.

Bug: T309388
Change-Id: I9fb7f3c536af4636e33f776de32f9f90b88827c9
2022-06-03 16:26:46 -05:00
jenkins-bot
6658a7f000 Merge "Add unit testing for MediaWiki\Rest\Validator" 2022-06-03 18:52:44 +00:00
Bill Pirkle
a4b5c67b16 Add unit testing for MediaWiki\Rest\Validator
MediaWiki\Rest\Validator is largely a wrapper, but has some behavior
of its own which deserves testing.

Bug: T309388
Change-Id: Ida4be429fa6795a3494593c457b93ef8e4f68b3b
2022-06-03 12:53:38 -05:00
Kosta Harlan
bd94eae1ad RCFeedTest: Ensure wgRCEngines is set to array for test case
If it is null, the test will fail, and the test expects RCEngines to
be an array.

Change-Id: I5e29bdf862b098777fa36ce49d80e395cc8e5a3e
2022-06-03 14:43:07 +00:00
Amir Sarabadani
dd9b44b167 rdbms: Move selectSQLText to SQLPlatform
Bug: T307616
Change-Id: I5218bca6633ad4d2704267e0c40926ca171fb1f7
2022-06-02 21:35:04 +02:00
Kevin Israel
ae0fc3b02f DiffHistoryBlob: Remove workarounds for old PECL xdiff versions
Versions of PECL xdiff older than 1.5.2 cannot be compiled against
PHP 5.4 and newer (we require PHP 7.2+). See changelog:

 https://pecl.php.net/package-changelog.php?package=xdiff

Change-Id: I28d27fd3bbac6a42827a2b46f06f25657023cc10
2022-05-31 00:11:27 -04:00
Kevin Israel
7cf5121226 DiffHistoryBlob: Don't check for hash PHP extension
MediaWiki has required this PHP extension for quite a while by now.
Furthermore, it is always available in PHP 7.4 and later.

Change-Id: Ifbf3400bca75351ea8fa461ca27259ee31543237
2022-05-31 00:11:27 -04:00
daniel
7f8e3c5360 Docs: remove references to DefaultSettings.php
Bug: T300129
Change-Id: I1e83a0dde6235bed91d28d7d43691c6a5d979f2f
2022-05-30 21:27:09 +02:00
Umherirrender
f01a391f0d tests: Fix types in documentation by adding use statements
Some types used in @param/@return are not correct,
because the class is not used with namespace

Change-Id: Ic2643687378a6addabc2c9cd402224e442257f86
2022-05-29 07:11:15 +00:00
jenkins-bot
05f9489b45 Merge "tests: Do not use class alias in @covers" 2022-05-27 23:14:41 +00:00
jenkins-bot
907c80de45 Merge "tests: Use namespaced IDatabase class" 2022-05-27 23:13:16 +00:00
Umherirrender
b0398654c5 tests: Do not use class alias in @covers
Also fix case for the XMLTypeCheck test

Change-Id: I809510c8085a36e20fd0eefb5e77d2671b3148f2
2022-05-28 00:37:43 +02:00
Umherirrender
770f905900 tests: Use namespaced IDatabase class
Change-Id: I7171ff26faee00d9eaabc33c2f3d91049ea0b40d
2022-05-28 00:09:55 +02:00
Bartosz Dziewoński
566b185e9c resourceloader: Tweak RL\FilePath handling in packageFiles
ResourceLoader's FilePath is designed to allow a FileModule
to include files that exist outside of the module's localBasePath,
to allow skins and extensions to extend core MediaWiki modules.
This is accomplished by having the FileModule use the FilePath's
localBasePath instead, in FileModule::getLocalPath.
(Similarly for remoteBasePath, but these are going out of fashion.)

However, the code processing 'packageFiles' did not handle this right:
it used FilePath's localBasePath when it appeared as a 'file',
but not when it was returned by a 'callback' or 'versionCallback',
using the FileModule's localBasePath instead in that case. Most
existing uses of FilePath in 'packageFiles' required the same base
path as the module, so it was convenient to avoid providing it twice.

To keep that convenience (already relied on by some extensions too)
while also allowing skins and extensions to add files from their own
directories to existing modules, the code processing 'packageFiles'
now uses FilePath's base paths in all cases, but they are optional,
and will fall back to the FileModule's paths when not provided.

Follow-up to 2890bca27d.

Change-Id: I38a0761ae4633a567b685b52c1d73b6ce280ffb7
2022-05-27 22:40:41 +01:00
jenkins-bot
efa485a54d Merge "Extract parameter handling from Maintenance base class." 2022-05-26 17:53:53 +00:00
Timo Tijhof
0bb1538929 REST: Hide exception message when wgShowExceptionDetails=false
This reverts parts of I8520d8cb16 and Ib941c22d6b7e.

The documentation of ShowExceptionDetails, as well as all other
uses of it (e.g. MWExeceptionRenderer for index.php, API, and
ResourceLoader) take it to mean to hide both exception message and
details.

This is why MWExceptionHandler didn't have, and didn't need,
the added complexity of this as a parameter as this method
simply wouldn't be called at all in that case.

* Rename the method added in I8520d8cb16 to match the one
  in MWExceptionRenderer.

* Update REST handling to now print any exception details
  when it is true.

* Remove the now-unused code introduced in Ib941c22d6b7e.

Change-Id: I1a9920dea0bafe315a20489efbe46ea9b55b0f74
2022-05-26 14:45:50 +01:00
jenkins-bot
06f1de611b Merge "rdbms: Move handling index and table aliases to SQLPlatform" 2022-05-25 22:29:34 +00:00
daniel
a9f47fd5ad Extract parameter handling from Maintenance base class.
We will need parameter handling in the runner as well as in the actual
maintenance script. So pull it out, so we can re-use it.

Change-Id: Ib67667fead8350e0a539323fb05b160f4c2d882e
2022-05-25 10:40:24 +02:00
Tim Starling
3e2653f83b ResourceLoader namespace (attempt 2)
Move ResourceLoader classes to their own namespace. Strip the
"ResourceLoader" prefix from all except ResourceLoader itself.

Move the tests by analogy.

I used a namespace alias "RL" in some callers since RL\Module is less
ambiguous at the call site than just "Module".

I did not address DependencyStore which continues to have a non-standard
location and namespace.

Revert of a241d83e0a.

Bug: T308718
Change-Id: Id08a220e1d6085e2b33f3f6c9d0e3935a4204659
2022-05-24 15:41:46 +00:00
jenkins-bot
59a788b007 Merge "Rest: Migrate parsoid stashing logic from RESTbase" 2022-05-23 20:17:16 +00:00