| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
We converted most of the LinksUpdate tasks to use ::getLinkList()
in I32df68714ffdf2f0745b974f47bc3ccceef1f41c but CategoryLinksTable
got overlooked.
Follows-Up: I32df68714ffdf2f0745b974f47bc3ccceef1f41c
Change-Id: I2953947e2b0a3c05dcba89d798c6b977113c3dc0
|
|
|
|
| |
Change-Id: I0d8d2237500ed6f18439410c902d47c42e4119bc
|
|
|
|
|
|
|
| |
Found via disabling phan's alias support for a run (and ignoring wgLang's
hard-coded state of being a \Language, alas).
Change-Id: I4753bcd84d72d6de111fc7ffc5841fa417bf7333
|
|
|
|
|
|
|
|
|
| |
In MediaWiki/Exception, to follow PSR-4 per plural vs. singular (this can be
changed later if people really care). Also, move the couple of exceptions in
here that were already namespaced in the MW-top-level into the new space.
Bug: T353458
Change-Id: I12ed850ae99effb699a6d7ada173f54e72f0570e
|
|
|
|
|
| |
Bug: T353458
Change-Id: I95690a312e356c45dbeed607d32fb0e4626690cf
|
|
|
|
|
|
|
|
|
|
| |
For the positive-delta case since the row can't be negative the
`GREATEST` is useless, so delete it. For the negative-delta case do the
GREATEST before the subtraction so that it doesn't try to temporarily go
negative.
Bug: T315573
Change-Id: I0a27a57835048ee6a06266d377ed8f3f52ddf435
|
|
|
|
|
|
|
|
| |
Use modern php syntax to call a callable.
Reduce the stack trace to improve performance
and better IDE and static analyzer support
Change-Id: I9ef131032a662a3b8db69aa7079dbd51f88f575a
|
|
|
|
|
| |
Bug: T299951
Change-Id: Ifd9876bcb452e412b7335741e74cfc4c820aa248
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Same as Ia294bf4 did for 1-line comments. This patch removes slightly
more complex 2-line PHPDoc comments that don't add any new information
to the code, but literally repeat what the code already says.
They say "don't document the code, code the documentation", and we
are doing this more and more. We just tend to forget to remove the
obsolete comments.
Note I'm also removing a line of text in a few cases when it's very
short and literally says the same as the method name. Again, such
comments add zero new information.
Change-Id: I01535404bab458c6c47e48e5456403b7a64198ed
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I assume these are all either auto-generated by an IDE or the
language-level type declarations have been added later. In any case
the comments don't add any new information to what the code already
says. This is just extra clutter that makes the code harder to read,
I would argue.
There are many, many more comments like this. In this patch I
intentionally focus on the most trivial 1-line comments.
Change-Id: Ia294bf4ce0d8a77036842fe25884bc175c2b0e7d
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Make the Maintenance transaction wrapper methods directly invoke
DeferredUpdates::tryOpportunisticExecute() and flush stats data.
This includes the following methods:
* Maintenance::commitTransaction()
* Maintenance::commitTransactionRound()
* Maintenance::waitForReplication()
Add explicit DeferredUpdates::tryOpportunisticExecute() calls to
integration tests as needed.
Deprecate the now-unused IDatabase::setTransactionListener() and
ILBFactory::setWaitForReplicationListener().
Bug: T373057
Change-Id: I06488d1826ee97de460cf52117b5d691fa5945ad
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The class was introduced for and is exclusively used by the Search
component, and is already documented as part of the Search docgroup.
It was placed under the deferred directory because, 10+ years ago,
we used to treat MediaWiki as something that (mostly) a single team
can maintain and look after, but this has changed a lot since then.
* Mark the class as internal. I can't think of a use case outside of
core, and indeed it has no references outside core
(per Codesearch/Everywhere).
Follows-up Ibd40734b9, which namespaced this class under Deferred.
Remove both the global class alias and the Deferred alias, since
the class is now internal and requires no back compat aliases.
Bug: T364652
Change-Id: I48937dcda4144e5e039c38a2e336f8361e2d492d
|
|
|
|
|
|
|
|
| |
This replaces the internal uses of the deprecated ParserOutput::get*
methods and isolates the ParserOutput internal representation from
most of the users.
Change-Id: I32df68714ffdf2f0745b974f47bc3ccceef1f41c
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Group the class under the Language doc group, matching
the MessageCache class for which MessageCacheUpdate is a utility.
* Mark the class as internal. This class was created in 2018 with
Ie5e1e83d6740344b7 specifically for use in MessageCache.php. I can't
think of a use case outside of that, and indeed it has no references
outside this file (per Codesearch/Everywhere).
Follows-up Ibd40734b96fd, which namespaced this class under Deferred.
Remove both the global class alias and the Deferred alias, since
the class is now internal and requires no back compat aliases.
Bug: T364652
Change-Id: I3bd99e935c2c9bab8b674d06c388a995ea2c2c07
|
|
|
|
|
|
|
|
|
|
| |
We don't really have to care what the exact file extension used
in the file namespace is and the current list was heavily outdated.
This simple regex is a much safer approach.
Bug: T366904
Change-Id: I3854e97d9c172b848c37b187e0da3f2d67356d6d
|
|
|
|
|
|
|
| |
This makes it clearer what kind of connections they refer to and is
consistent with the vast majority of callers.
Change-Id: I2c5499439731b73dad90b78e5ab1069d468fe3d3
|
|\
| |
| |
| | |
(begin|commit|rollback)PrimaryChanges()"
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Automatically perform the empty-transaction commit logic in methods
like beginPrimaryChanges() and commitPrimaryChanges(). This avoids
the proliferation of callers having to call the same set of methods
one after another for non-obvious reasons. It also discourages code
from making brittle assumptions that might fail for setups where
there is only a primary or the primary has non-zero read load.
Deprecate flushReplicaSnapshots() and remove callers.
Clarify the related method documentation.
Bug: T315664
Change-Id: I255afd22ffcaeac0fad2d4e4a2a0c55c99be7905
|
| |
| |
| |
| |
| |
| |
| | |
Changes to the use statements done automatically via script
Addition of missing use statement done manually
Change-Id: I73fb416573f5af600e529d224b5beb5d2e3d27d3
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Implicitly marking parameter $... as nullable is deprecated in php8.4,
the explicit nullable type must be used instead
Created with autofix from Ide15839e98a6229c22584d1c1c88c690982e1d7a
Break one long line in SpecialPage.php
Bug: T376276
Change-Id: I807257b2ba1ab2744ab74d9572c9c3d3ac2a968e
|
|/
|
|
|
|
|
|
|
|
| |
Providing the function name is often optional from the php code,
but it is needed for better logging, so make it mandatory and let phan
report issues about this.
Bug: T374546
Follow-Up: I5227f2fa65850ac8c6f620900f22d1f4e7bfd470
Change-Id: I3becd23d3ba9f452a8afd833d509cd907e56ca47
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Move deduplication of language links out of Parser.php and into the
ParserOutput in order to be compatible with alternate Parsers (Parsoid).
Clean up various inconsistencies: ensure deduplication also happens in
OutputPage when multiple ParserOutputs are merged into the final output,
and ensure that the deduplication in LinksUpdate is done in the same
order (first link prevails) as in Parser/ParserOutput/OutputPage.
Deprecate OutputPage::setLanguageLinks() (the matching
ParserOutput::setLanguageLinks() was deprecated in 1.42).
As a breaking change, return an array, not an array *reference*, from
ParserOutput::getLanguageLinks(). This allows us to safely modify the
internal representation of language links. As far as I can tell, no one
used the returned reference to sneakily modify the list of language
links, and there not a good way to have deprecated this before making
the breaking change.
While we're at it, we've added tests to ensure that language link
fragments are preserved.
Bug: T26502
Bug: T358950
Bug: T375005
Change-Id: I82a05a51d94782ebb9fa87ff889ca0f633b3e15c
|
|/
|
|
|
| |
Bug: T353458
Change-Id: I23cf7991f8792d4d000d1780463d8ce76dc0aee0
|
|
|
|
|
|
|
|
|
|
| |
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: I1da4b272a6b28c419cc8e860d142dae19ca0bbcf
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
wfGetUrlUtils() is also deprecated, but less so, so we can do this first
and then properly replace the individual uses with dependency injection
in local pieces of work.
Also:
* Switching Parser::getExternalLinkRel to UrlUtils::matchesDomainList
exposed a type error in media.txt where $wgNoFollowDomainExceptions
was set to a string (which is invalid) instead of an array.
Bug: T319340
Change-Id: Icb512d7241954ee155b64c57f3782b86acfd9a4c
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Also TitleLinksTable::getTitleArray
Depends-On: I7bd6714f31a1a3195c1b9a47c9c49b92b9873212
Depends-On: I9514e77a73eea5ee7fbcf4cda79c8f9c4acbd328
Depends-On: I25d047ceb707837009e0a703693ebc2f49fc0ba9
Change-Id: I00b4363b9af7fef3c5a6ae4f612b37c3cd470d45
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
There are enough points where tryOpportunisticExecute() is triggered
that this no longer needed.
Change-Id: Ie27d4ec299df0e6f2754baedc237a473821f0709
|
|\ \ \ |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Remove null type hint and related conditional since it would be silly
to bother passing null and nothing is doing so according to code search.
Change-Id: I499aebd50433be8fd242461e86f5f9c69b300afe
|
|/ / /
| | |
| | |
| | |
| | | |
Bug: T353458
Change-Id: Ia0f3e22078550be410c4b87faf6aa4eabe6e270d
|
|\ \ \ |
|
| | |/
| |/|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The comment mentioned this, but the code did not actually do it.
Typically, flushing these does not matter much due to replication
lag. However, if a deferred update starts with a replication wait
or the prior one ended with a replication wait, then flushing the
read transactions can make a reliable difference.
Also, if many deferred updates are running in a process, flushing the
snapshots means that mysql can purge old versions of rows, since
otherwise they could potentially be seen by a future query (e.g. MVCC).
Bug: T315664
Change-Id: Ia3ac4193e56ef5b49727457b0cd50dfbc987f881
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This is more convenient for callers since they can avoid the pattern
of setting $fname to __METHOD__ and needing $fname in the "use" clause.
This is also more consistent with AutoCommitUpdate/AtomicSectionUpdate.
Remove @since tags from @internal MWCallableUpdate class.
Change-Id: I67c58897dc366a55f43e0a61d56064b26d520c17
|
|/
|
|
|
| |
Bug: T361023
Change-Id: Ibf1c93ddbf8f680e8fb9442816f6fed94a069c0a
|
|
|
|
| |
Change-Id: I04e408e734edc5498c32c4433f02da613bbfafa6
|
|
|
|
| |
Change-Id: Ib02dac0c607fc9931e1384a9cd7e989db683a4ff
|
|
|
|
| |
Change-Id: I03c068c4bf098ab073989a0ea32a0f87fe878727
|
|\ |
|
| |
| |
| |
| |
| |
| | |
Bug: T299417
Follow-Up: I906e069a63d1dae14924c72318b22b16244371d6
Change-Id: Ia5f730af82f904bd42552e6c6a5c4dadf2454d3a
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This patch introduces a namespace declaration for the
MediaWiki\Deferred to RefreshSecondaryDataUpdate and establishes a class
alias marked as deprecated since version 1.43.
Bug: T353458
Change-Id: I9ee3282918f8f3d444a12ca32434a15e93952055
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
| |
It was asked in a patch review to apply fully import
InvalidArgumentException where possible. I was guessing some
of my other already merged patches have but turned out such
thing exists other places style so for the sake of consistency
I've turned rest of inline import of the specific exception at
top of the file.
There are instances of source files that aren't in any namespace but
have fully qualified import which this patch doesn't touch.
Change-Id: I4071fc698b65746d9594cf4d5f45bae82843d436
|
|
|
|
|
| |
Bug: T359243
Change-Id: If5f754054e469bdf11dc1446d7f43628dfda65b0
|
|
|
|
|
| |
Bug: T326274
Change-Id: I90493d7cd4c21fdc022bcc19765fc04d986a9c8f
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch uses the recommended MW practice for injecting
settings into MW services. Instead of passing in the full
config object, pass in service options which MW service wiring
will use to lookup settings/options from config sources.
So in this patch, the various options have been identified
and put into `CONSTRUCTOR_OPTIONS` constant and inject via
service wiring.
Test plan
=========
Ensure that the special page: `Special:Search` still works
with this patch checkout on your local test wiki.
When you visit `Special:Search` on your local wiki, you should
see a search form view. Type in something like: "Main Page" and
then hit search. If everything works well, then local test passes.
NOTE
====
This patch also resolves a TODO which mentions the removal of
the `getConfig()` method from the SearchEngineConfig class.
Change-Id: Ib5dfc10f3f210c6c35247f4f30f9549dd60e0af7
|
|
|
|
|
|
|
|
|
|
|
| |
This ensures uniform treatment of all places that call `addCategory`
without duplicating the `defaultsort` code; it also ensures that the
effect of the {{DEFAULTSORT}} parser function is independent of page
position.
Bug: T40435
Bug: T353530
Change-Id: I4480a6d59e766fa4eddc9ec9117c58b66771bb47
|
|
|
|
|
|
|
| |
The RandomPage alias was dropped in an earlier commit, so
group the release note entry in with these.
Change-Id: I207d7463ced1a1bb8b8ac749eba175fc0037a217
|
|
|
|
| |
Change-Id: I7f85d931d3b79da23e87b4e5692b2e14be8fcaa0
|