SpecialBlock calls HTMLForm::setSubmitDestructive(). This patch applies
that to the new Vue version of Special:Block.
Additionally, since we're not going to enable multiblocks in the initial
launch, the submit button message is changed to as it was before. "Save
block" is questionable even for multiblocks. It will likely be a while
before we iron out the UI for multiblocks, so we might as well remove
now-unused 'block-save' message.
The "[username] is already blocked" message is now also surfaced, i.e.
browsing to [[Special:Block/someblockuser]]. Like the old Special:Block,
changes to the block target field won't re-query to see if the user is
already blocked (though that would be a fine improvement). However
*unlike* the old Special:Block, such changes do make the message
disappear.
Bug: T373572
Change-Id: Iceaedbb1e3496c52b49a2b96d65445da45261b9f
Match the order of other methods of that class.
Follows-Up: Id4b29c6d09c79649c94d2da2e678af52a967bbe5
Change-Id: Ic8f70ba2b6466bb91f467d4e87e9de9e09c0245a
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: Ifc27750207edc09e94af030d882b6f1a5369cf98
Callers should not catch an unchecked exception, so it doesn't belong
in a function signature. Unchecked exceptions indicate a coding error,
which by definition the code will not be able to handle correctly.
If any of these exceptions were supposed to be in response to an edge
case, user input, or initial conditions, then they should be changed
to a runtime error. If the exception class cannot be changed, then
the annotation should include a comment explaining its purpose and
prognosis.
Bug: T240672
Change-Id: I2e640b9737cb68090a8e1cb70067d1b74037d647
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: I73c413727a63d14efb5028b27128784c98724110
This never worked because it looked for `element` instead of `elements`.
The test repeated the same mistake.
Bug: T278576
Bug: T255717
Change-Id: I9bfceb6b8bd761244af6eda0e2ae08e98238aa76
While not documented or tested, aliases previously not only adding
but also replaced values.
Instead, emit a warning to inform skin developers of this conflict.
Note that the `content-links => elements` alias already behaves
this way (only if not already set), which the other aliases would
now be consistent with.
Change-Id: I66ae66b37bba14b2f65710f3d32f17d4e9a5a7a3
* Function alls are either complete on one line or one arg
per line. Avoid confusing calls where the args are on their
own line as this creates visual ambiguity over how many args
are passed, and what each piece belongs to. For example, is
`true` or `false` passed as 2nd arg to applyFeaturesCompatibility?
* Replace comment about list-form behaviour with something that
provides intention and insight instead of merely repeating what
can already be seen from the code.
* Fix malformed `@param` docs that used variable as part of sentence.
* Use named data providers to ease PHPUnit debugging,
and to make code coverage reports on doc.wikimedia.org more useful.
Change-Id: I2efd6cc7ac59c80684c9411025c4226473a36d43
* Move docs for deprecated aliases from top-level mentions into
footnotes under primary docs. Still easy to search for, but no
longer advertised as important for skin devs to know about
or scan past when reading.
* Fix bug in 'legacy' logic where the key was not unset, thus
mandating a needless entry in FEATURES constant. With the bug
fixed, this internal entry is no longer needed.
* Fix bug in 'interface' logic where the key was not unset
when the value is false. This would break the "skins.vector.styles"
module otherwise, and had a similar workaround in place that
is now no longer needed.
* Remove other unneeded entries in FEATURES for keys that were
already being unset by applyFeaturesCompatibility().
* Remove deprecation warnings in favour of letting ResourceModules
give a stable interface from ResourceLoader to skin.json.
* Add missing test to confirm no-op behaviour.
Bug: T374262
Change-Id: I9f4b1d48127d0afe67bada44d8dc4472507f9506
When there are conflicts between namespace prefixes and interwiki prefixes,
ApiParse was inadvertently converting from an interwiki link to a local link
by reparsing the title. Use a TitleValue as an intermediary to ensure
the interwiki link stays an interwiki link.
Bug: T204792
Bug: T363538
Change-Id: I6a94350b781539de2390070e4bcbad4b19eba78f
When there are conflicts between namespace prefixes and interwiki prefixes,
the Skin was inadvertently converting from an interwiki link to a local
link by reparsing the title. Use a TitleValue as an intermediary to
ensure the interwiki link stays an interwiki link.
Bug: T204792
Bug: T363538
Change-Id: I351dfcff7cd6b32f4fa67507e5c5a432dce61a01
In order to replace certain /api/rest_v1 endpoints, we
need to have something in MediaWiki that generates a compatible
responser. The MediaWiki REST API error format does not match
RESTbase. So the easiest approach seemed to be to
add a compatibility mode, triggered using the x-restbase-compat
header. This can be set via the gateway when rerouting the request.
Bug: T374136
Change-Id: I73934940d367be52941bd27861c248ab5bcfb5d2
Move the checks for the existence of the user and the presence of
their email address before the 'SpecialPasswordResetOnSubmit' hook,
instead of after. This allows extensions to make their own decisions
about whether a user exists or has email.
This also means that extensions must now check the 'requireemail'
preference when only the username is provided. They already had to
check it when only the email was provided, so this seems more like a
bug fix. To allow them to check this logic, if both the username and
email were provided by the user, provide both of them to the hook.
Bug: T151012
Change-Id: I6baf2c5194f981803198729f59e1e83d5644383a
* This change introduces two new optional parameters to the 'allusers'
API call named 'excludenamed' and 'excludetemp' that allows filtering
accounts based on whether they're named accounts or temporary
accounts. This is tested by using the temporary matchPattern
configured with $wgAutoCreateTempUser.
* User widgets that call 'allusers' have been updated so that
'excludenamed' and 'excludetemp' can be optionally set so that named
or temporary accounts may not returned with user suggestions.
Bug: T332030
Change-Id: I6563ae610017fd1cd35c36ba65906041f7f68c4b
Why:
* Maintenance scripts in core have low test coverage.
* Testing scripts which are not overly complex should create
less complex tests that easily raise test coverage.
What:
* Create a test for both exportSites.php and importSites.php which
checks that the XML file produced by exportSites.php can be
parsed and produces the same sites table config as was exported.
Bug: T371167
Change-Id: I3eb1b86803ee2413e624f9ffe699a60161103758
In order to replace the /api/rest_v1/page/title/{title} endpoints, we
need to have something in MediaWiki that generates a compatible
responser. The v1/page/{title}/bare and v1/revision/{id}/bare endpoints
are functionally equivalent, so the easiest approach seemed to be to
add a compatibility mode to them. The compatibility mode is triggered
using the x-restbase-compat header, which can be set via the gateway
when routing the request from /api/rest_v1/page/title/.
Bug: T374136
Change-Id: I4af7ff5325660ae30faebb24753b9dc1c3acb2b3
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: I1f306a3925d6768209a06e70082598b2f70cd319
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: I82b4f543ed004fc960b6b1f8ac718db2a63a40fe
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: I56a1d27ba2dfbcdd929a0e0c96664bc2a31e38f2
Why:
* Maintenance scripts in core have low test coverage
* Testing less complex parts of the scripts will help quickly
improve test coverage.
What:
* Create DeleteTagTest which partly tests the script.
Bug: T371167
Change-Id: I55370a855a7f88f94aa2e2037edb478ea86f266a
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: I41ad89cc3112a2911ad40c55583bff2d7787da68
For language links, when there are conflicts between namespaces and
interwiki prefixes, it is important to use TitleValue for language links
rather than to try to reparse the Title. Language links also preserve
fragments, unlike other link types in ParserOutput; added tests to
document this.
Added handling for interwiki links and template links.
Bug: T363538
Change-Id: I6e8ff8ed7f8819000cc3f80e49c0739b568217a4
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: I7dec01892a987a87b1b79374a1c28f97d055e8fa
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: I46f46f1855ca32c89a276b06f4e2051ff541886e
Why:
* The logging table on en.wikipedia.org contains an entry from
2005 which is an unblock of an autoblock. However, the log_title
contains the namespace, which makes the code that looks for
logs which target an autoblock fail (because it checks for the
first character being '#').
* Fixing the log_title to remove the 'User:' prefix from rows which
are autoblocks (i.e. searching for log_titles which start with
'User:#') should address the exceptions seen on Special:Log for
these rows.
** The search can be limited to rows which have the 'unblock'
log_action, as this has only been seen for this type of log.
What:
* Create fixAutoblockLogTitles.php which searches for the entries
and then updates the log_title value to no longer include the
'User:' prefix
** The queries to search are split, such that the expensive LIKE
query is performed on batches of row IDs. If the LIKE query is
applied directly to all rows in the table, the query takes 30s
to run on WMF production.
* Add this maintenance script to update.php. It will be run once
as the class extends LoggedUpdateMaintenance.
* Test the newly added maintenance script to ensure it works.
Bug: T373929
Change-Id: Ia62db56eda456bb764303b5f4b5a29be8f2d8fff
Previously, if any locks where left, the destructor would call
the doUnlock() method, which would always throw an exception.
Add some basic tests for MemcLockManager.
Change-Id: Ie0f398a14f154e5cede210cca633c7e7e90a7f57
Why:
* When a temporary account exits their session, the
Special:UserLogout page is loaded to indicate the success.
* However, the success page talks about the temporary account
logging out which may cause confusion.
* Per design mocks shared on T374519, this should be modified
to indicate that the user logged out of a temporary account.
What:
* Set 'templogout' as the page title when the user is logging out
of a temporary account.
* Set 'logouttext-for-temporary-account' as the message shown
for a logout success when the user is logging out from a
temporary account
* Update mediawiki.page.ready/ready.js to add a flag to the
URL Special:UserLogout URL that is redirected to once the
logout API call has occured.
* Update tests for SpecialUserLogoutTest
Bug: T374519
Change-Id: Ib62cdb5ba716976321cd556aa9defe97b3446b33
Add Html::listDropdownOptionsCodex() that takes a bulleted list like
[[MediaWiki:Ipbreason-dropdown]] and adapts the data struture for use
with a Codex Select component.
Currently optgroups are not supported (T367241) so we show the optgroup
labels as disabled options instead.
URL query string parameters do not yet prefill any fields. This will be
tackled as part of T368583.
Bug: T362912
Change-Id: Ib89dcf35ca2a1cd74404c42f5411d7c095b98952
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: I9e5330601ded043ad24a99932fe3fa0ea6c427aa
Why:
* The deleteSelfExternals.php maintenance script is broken on
my local wiki as the SQL generated by the script errors out
when run on MariaDB.
* This script should be fixed, updated to use the query builders,
and tested to ensure that any future breakages do not go
unnoticed.
What:
* Fix the deleteSelfExternals.php script to use a DELETE query
that works, by generating it using the query builder.
* Create DeleteSelfExternalsTest to test that the script now
works.
Bug: T371167
Change-Id: Id423fa5c1bfe666f57a38e733334342ac1ad2cea
This makes the code discoverable by IDEs and such. The methods are
not flagged as unused any more.
Also add a bunch of type declarations to closely related code, and
remove more unused code and obsolete and redundant comments.
Change-Id: Ibbb3b5a8f3d84a6635ae794a5179931e0ae6e7a9
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: I48014b6464f3e7e2b7f083e67f517af0b1a9367e
Why:
- When signing up for an account, temporary users are currently forced
to provide a reason for creating an account, and also have the option
to send a temporary password to an email address.
- Neither of these options are useful for temporary users wanting to
create a full user account.
What:
- Don't show these two form fields on Special:CreateAccount for temporary users.
- Add a functional test for the temporary user account creation flow.
Bug: T328718
Change-Id: Ie545857f7647be89d9462ec2b0def48690f0a2bf
I believe we don't need this any more. A test should never leave an
uploaded image behind, but delete it. It should be totally fine when
the same trivial test uploads the same image over and over again. All
the extra complexity to trick MediaWiki's duplicate detection shouldn't
be necessary (any more).
Also change the default to svg instead of jpg. Again, this creates much
smaller files with much less effort.
Note this code was already mostly unused because of the previous patch
I7f3d586.
Change-Id: I5c16ba7bed0fffa43549b786e50d6d1dd5592ad0
It removes use of already deprecated global functions,
wfParseUrl and wfAssembleUrl by use of PHP's parse_url
and use of UrlUtils::assemble copy.
Change-Id: I07a5b351973228ea2e4545d042bb53ddf2c5730a
Why:
* The 'logout' API allows users to logout of their account
* This calls the "UserLogoutComplete" hook which users assume
is only called when a logout is successful.
* However, the hook is called by the API even if the user making
the request was not logged in
* The Special:UserLogout page does not call the hook if the user
performing the request is already logged out.
What:
* Return early in ApiLogout::execute if the user is not logged
in, and also add a warning to the response to indicate this.
Bug: T374353
Change-Id: I72e73c2391a475cec2e5cb24250f9aa2b792e5de
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: I2606072015d71b4bdda70a7c149d9f55ac205a3c
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: Idf17719c875466810313f0fbbf16bc67f3e40059
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: I90ecf85cb6f639af4be1947ccfbfb16d5b84cab3
This is the fourth patch of a series of patches to remove
ParserOutput::getText() calls from core. This series of patches should
be functionally equivalent to I2b4bcddb234f10fd8592570cb0496adf3271328e.
Here we replace calls to getText where a ContentRenderer is available
close by by temporary ParserOutput::runOutputPipeline that will
eventually be replaced by a call to (probably) ContentRenderer
(T371004). Doing this work in stages allows us to separate the work of
"bring ParserOptions to the call site" from the work of "bringing
ContentRenderer(ish) to the call site", since both need to be done for
to make ParserOutput a value object (T293512).
Change-Id: Ib4f9357293dc230df6e0ca2379a1e2a4cc1b91b7
Bug: T293512
It didn't have any use outside the core so went for the removal
instead of raising warning and hard deprecation.
Change-Id: I08dab348a89f1fe1adccfad4f003d9fb8b233f0d
Why:
* The REVISIONUSER magic word displays the username of the user
making the edit when the user is previewing an edit
* When temporary accounts are enabled, the user performing the
edit should see a temporary account name and not an IP address
to avoid confusion.
* This currently works as intended for all but the user's first
edit because, until they have submitted their first edit, they
have no temporary account. However, they should have a stashed
name for a non-existing account.
* Setting the ParserOptions user as the stashed name in this
edge case fixes the issue and should not cause unintended side
effects.
What:
* Update ParserOptions::newFromContext to use the stashed temporary
account name if all of the below are true:
** The current context user is an IP address
** Temporary account autocreation is enabled
** The user has a stashed name defined in their session
* In all other cases the user used in ParserOptions::newFromContext
is unchanged.
* Add tests for ParserOptions::newFromContext to verify these
changes and to avoid regressions.
Bug: T372723
Change-Id: Ie532aa997a59cbf5204a554bd087ba7451f7d47a
Before a test is started there are no services, there is no need to
reset services in setUp().
After a test finished all created services are destroyed by
MediaWikiIntegrationTestCase and does not need own teardown.
overrideConfigValue() also resets services
Change-Id: I41c71866ec6d93cd2b7e3dd45269e0972ed6a273
This class is not used very often:
https://codesearch.wmcloud.org/search/?q=RandomImageGenerator
But in these tests it's a serious bottleneck. For no good reason. We
don't really care how an image looks like during a test. Nobody will
ever see it. Not even when a test fails.
Bug: T225730
Change-Id: I7f3d586144ecdf480c773dc5e8b10f1ad4df8861
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: Id75cb2e5fbee0fe7600f92473d876f23730d46b7
WinCache is an APCu equivalent for use with Microsoft IIS, but in recent
years has been unmaintained and lacks support for PHP 8 and newer.[1]
So, remove support for it as MediaWiki will be raising the minimum
supported PHP version to 8.1.
[1] https://www.php.net/manual/en/install.windows.recommended.php
Bug: T365691
Change-Id: I4d2dc01a9119bb1f858132f0146b894750c1e86d
This allows to change the category link rendering by extension
CategoryTree without missing update of mCategoryData and mCategories
which leads to wgCategories = [] (T372155).
The new hook will be used in extension CategoryTree by
Ic86f210474cbc0e2dcebf664cf2309a4a4408f60.
Bug: T372155
Change-Id: Id82a77a57d1f12233d974ea4c1b093f50c5ab74f
Why:
* The "Tools" menu contains a link to Special:UserRights.
* In 4da1989b63 this was updated to
not display the "Change user groups" link for a temporary user
* However, we should also hide the link for a temporary account.
What:
* Update Skin::buildNavUrls to not add the link to
Special:UserRights if the user is a temporary account.
Bug: T373988
Change-Id: Ib7d94c6cd5fb213c2bac7b55b8e77c4930e8f5d3
This was intially disabled in I6c54466e9517d98. Now we use HashBagOStuff during test which doesn't use any database interaction.
So it's okay to enable them now.
Bug: T343492
Change-Id: I0413fc9e302085f27ea9e00eafee23858126426b
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: I07ce1f37d1bfb18d6e73dd008a712b3ca60a80e9
Why:
* SpecialUserRights::userCanChangeRights is used by
Skin::buildNavUrls to determine whether to display a link to
Special:UserRights for a user
* Special:UserRights does not allow temporary accounts, so the
aformentioned method should return false if the name is a
temporary account to not add the navigational link.
What:
* Return false from SpecialUserRights::userCanChangeRights if the
provided target user is a temporary account.
* Add some tests for SpecialUserRights::userCanChangeRights to
verify this behaviour.
Bug: T373988
Change-Id: Ib960c0ae0a04650acfb17d273389f151a04672a2
Why:
* On wiki farm installs, it is possible that temporary accounts
are enabled on wiki but not another wiki
* Special:UserRights can assign groups to users on other wikis
* This currently allows temporary accounts to be assigned groups
from a wiki where the feature is disabled and not known.
* The Special:UserRights page should disallow this by preventing
cross-wiki assignment of rights when the target username is
reserved by the temporary accounts system.
** This works because the reserved pattern is accessible even when
the feature is not known
** Furthermore, the reserved pattern is expected to be set for all
wikis in the farm if one wiki has temporary accounts enabled,
so that the temporary account cannot be created on wikis which
have the feature disabled.
What:
* Update SpecialUserRights::saveUserGroups and ::fetchUser to
reject usernames when:
** The wiki ID for the username is not local
** Temporary accounts are not enabled on the wiki
** TempUserConfig::isReservedName returns true for the username
* Add a test to verify that temporary accounts cannot be given
user groups by the special page.
* Testing the changes made in this commit will be difficult as it
requires having a second wiki set up, and this is not done in
CI (which makes the test non-blocking for CI).
Bug: T372046
Change-Id: I2d60c5b3322caa4629b4e73c0b0b525fd1028946
Why:
* The LoggedUpdateMaintenance class is not tested and testing it
will help avoid regressions/bugs.
What:
* Create LoggedUpdateMaintenanceTest
Bug: T371167
Change-Id: I84f5399bf67cc98d7c731d75ee668481ce0817b2
Avoid own teardown as MediaWikiIntegrationTestCase tracks the file and
delete the file on teardown
Remove unused tempnam (added unused in 3db119428a)
Change-Id: Ic53398c89c885f1c263dfcdbc59f6129f605f5a7
Why:
- TemporaryPasswordPrimaryAuthenticationProviderTest currently combines
multiple test cases within a single test method, leading to
duplication and making the tests harder to grok.
What:
- Split the test cases within the test class to use either data
providers or separate methods where the inputs cannot be provided via
a data provider.
- Make getProvider() stateless and initialize the $manager and $validity
fields unconditionally via a setup hook to avoid confusing null errors
if attempting to manipulate these fields prior to obtaining a provider
instance.
Bug: T328718
Change-Id: I3e53d06ec5bde6a8f842f5caed5cdbad883f7afd
Why:
* Maintenance scripts in core have low test coverage
* Improving this will reduce the chances of regressions and bugs
* Some files are mostly covered, and expanding their associated
tests should fully cover them or at least further improve
coverage.
What:
* Expand RollbackEditsTest
Bug: T371167
Change-Id: I852f5ecb8f316138f0dc8196dc0999f35d0ec093
Why:
* Maintenance scripts in core have low test coverage
* Improving this will reduce the chances of regressions and bugs
What:
* Fix grep.php to batch requests for rows from the page table,
as it currently selects all rows in one go.
** Doing this on large wikis would result in millions of rows
being returned in one query.
* Create GrepPagesTest
Bug: T371167
Change-Id: I4c9a55257ee64609fece776ca15c4219764d5266
Why:
* Maintenance scripts in core have low test coverage
* Improving this will reduce the chances of regressions and bugs
What:
* Create a MockLocalisationCacheTrait which is used to generate
a mock LocalisationCache instance which has a limited and fixed
set of message keys
** This is created by splitting code from LocalisationCacheTest
* Create AllTransTest and DumpMessagesTest which make use of this
new trait.
Bug: T371167
Change-Id: Ie814c8136504d2af94ec9377d64b19d3a0e25eed
* The tests/phpunit/maintenance folder is getting quite long
and moving some tests to folders where possible would help
with this
* The BenchmarkerTest and MaintenanceTest classes are associated
with classes that are in an includes folder, so moving them
is possible.
* While moving MaintenanceTest, expand the tests for the class.
Bug: T371167
Change-Id: I7623470c244f228d7cc1da33b0bf135038732632
Why:
* Maintenance scripts in core have low test coverage
* Improving this will reduce the chances of regressions and bugs
What:
* Create ChangePasswordTest
Bug: T371167
Change-Id: Ia61283e4121f1130607ba103202e2e1a500f1cb2
Why:
* Maintenance scripts in core have low test coverage
* Improving this will reduce the chances of regressions and bugs
What:
* Create MakeTestEditsTest which fully tests the script
Bug: T371167
Change-Id: If71c09eea96c4b0fbf522162de3a5ed09a5770f6
Why:
* Maintenance scripts in core have low test coverage
* Improving this will reduce the chances of regressions and bugs
* Some files are mostly covered, and expanding their associated
tests should fully cover them or at least further improve
coverage.
What:
* Expand MigrateUserGroupTest
Bug: T371167
Change-Id: I3c40317988f822e077634cf63ab292df7ef66806
Why:
* Maintenance scripts in core have low test coverage
* Improving this will reduce the chances of regressions and bugs
* Some files are mostly covered, and expanding their associated
tests should fully cover them or at least further improve
coverage.
What:
* Expand GetTextMaintTest
Bug: T371167
Change-Id: I8667396cd8c16116ed9f885bf72c7b197c9fdd86
Why:
* Maintenance scripts in core have low test coverage
* Improving this will reduce the chances of regressions and bugs
* Some files are mostly covered, and expanding their associated
tests should fully cover them or at least further improve
coverage.
What:
* Expand ProtectTest
Bug: T371167
Change-Id: Iff86988967d8a69d71353fea4ba72705062aa95f
Why:
* Maintenance scripts in core have low test coverage
* Improving this will reduce the chances of regressions and bugs
* Some files are mostly covered, and expanding their associated
tests should fully cover them or at least further improve
coverage.
What:
* Expand ResetEmailUserTest
Bug: T371167
Change-Id: I3f15f7e96c58115c245ad24fe4f1334682534354
Why:
* Maintenance scripts in core have low test coverage
* Improving this will reduce the chances of regressions and bugs
* Some files are mostly covered, and expanding their associated
tests should fully cover them or at least further improve
coverage.
What:
* Expand CleanupWatchlistTest
Bug: T371167
Change-Id: I245c5550b3759d2267a89a5f81e34bec3fb97f24
Why:
* Maintenance scripts in core have low test coverage
* Improving this will reduce the chances of regressions and bugs
What:
* Create ValidateRegistrationFileTest
Bug: T371167
Change-Id: Icba4650a0d3f6af3d597628753af292f522e5456
Why:
* Maintenance scripts in core have low test coverage
* Improving this will reduce the chances of regressions and bugs
What:
* Create UpdateExtensionJsonSchemaTest which partly tests the
script.
Bug: T371167
Change-Id: I289147cdcede17071e80c878fd956f4069b643c2
Why:
* Maintenance scripts in core have low test coverage
* Improving this will reduce the chances of regressions and bugs
What:
* Create UserOptionsMaintenanceTest which starts on tests for this
script.
Bug: T371167
Change-Id: I51374a96a0dd73f5a155278f5a48c5b59c44d055
Why:
* Maintenance scripts in core have low test coverage
* Improving this will reduce the chances of regressions and bugs
What:
* Create CLIParserTest which does not yet test parsoid parsing
using the script.
Bug: T371167
Change-Id: I8852d9c9889e7bfef814ce28ef7d6efe375095e2
Why:
* Maintenance scripts in core have low test coverage
* Improving this will reduce the chances of regressions and bugs
What:
* Create RunJobsTest
Bug: T371167
Change-Id: I478c23440e4b0b373e9be41dee37de6460e7962e
Why:
* Maintenance scripts in core have low test coverage
* Improving this will reduce the chances of regressions and bugs
What:
* Create GetReplicaServerTest
Bug: T371167
Change-Id: I24fdda83c8a9c2ea0ad1dbbd1f9c90bb61a81439
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
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
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
Avoid assigment in conditions
foreach starts at begin of iterator, the while loop can process the next
from within the result, but all the iterator in search are rewinded
before iterator starts
Change-Id: I38b2729418e8389c681c6cd84858f5e5ed25bd3e
What it's trying to achieve can be done much simpler by just making an
out of transaction connection via setting CONN_TRX_AUTOCOMMIT flag.
Removing this allows us to get rid of a large portion of transaction
management in rdbms library as this is the only place that uses cancel
callbacks.
Split out of I3cb1e30611b83c0
Bug: T372169
Change-Id: Idad029b6da6b09e084d466d282ef1145ebd8fe73
Why:
* Maintenance scripts in core are mostly untested and testing them
will help to avoid regressions.
What:
* Create CommandLineInstallerTest.
Bug: T371167
Change-Id: Ia9ef03326d7c25b7eb310c191034932fffcbff8c
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
This allows Parsoid to add tracking categories, even though
the exact name of the categories is resolved by mediawiki
core.
Change-Id: Id4b29c6d09c79649c94d2da2e678af52a967bbe5
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
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
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