| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
Change-Id: I54c98085b21f1fe48ccf575d1b9dd60d3b855c58
|
|
|
|
| |
Change-Id: Ie0c1c955ca1a7028f75f24563fdeb9f94285af30
|
|\ |
|
| |
| |
| |
| |
| | |
Bug: T330640
Change-Id: I094eea810886b13d832be575d9b9df8f8e4a77ea
|
|/
|
|
|
| |
Bug: T328220
Change-Id: I3c36835fbd90acc301731e2b33ae4815cd4b0cc5
|
|
|
|
|
|
|
|
| |
I did this using a script written on top of antlr4 parser so it doesn't
have some clean ups a human would do but it's pretty nice already.
Bug: T330640
Change-Id: I608566700c6d737ee986bf47dda87effc69614d6
|
|
|
|
|
| |
Bug: T319340
Change-Id: I2d81c2d7fd31bb07a2d2057361f1670cdeb8b8d0
|
|
|
|
|
|
|
|
|
|
|
| |
- StatsdDataFactoryInterface
- LBFactory
- LoggerInterface
- $wgCommandLineMode
- JobQueueGroupFactory
Bug: T265749
Change-Id: I98af8e28e2be33a24a453586ec010a27c5bb5f38
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch doesn't deal with the injection of dependencies
and removal of the global state, but rather moves the code
from DeferredUpdates to the new service essentially as-is,
to simplify review. The changes to inject the various
services needed and make DeferredUpdatesManager a proper
service will be done in follow-ups, to make them easier
to follow.
While almost everything is changed from static to non-static,
DeferredUpdates::$scopeStack remains static as
DeferredUpdatesManager::$scopeStack, just in case multiple
versions of the service are created, to ensure that no
updates are missed.
Bug: T265749
Change-Id: I7f07eddf2fc399b15db4fe9be4c792ef8eb0747b
|
|
|
|
|
|
|
|
|
|
| |
It's going to be a bit small and narrow but it's better than sitting in
the root of includes/ plus I hope we can hollow out SiteStatsUpdate
class into the third one and or move this under a better directory in
the future.
Bug: T321882
Change-Id: Ia503b53b31ca00600f8c18b61a2652c3e146494e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There is no way to express that Title::castFromPageIdentity(),
Title::castFromPageReference() and Title::castFromLinkTarget()
can only return null when the parameter is null. We need to add
Phan suppressions or explicit types almost everywhere that these
methods are used with parameters that are known to not be null.
Instead, introduce new methods Title::newFromPageIdentity() and
Title::newFromPageReference() (Title::newFromLinkTarget() already
exists), without the null-coalescing behavior, and use them when
the parameter is not null. This lets static analysis tools, and
humans, easily understand where nulls can't appear.
Do the same with the corresponding TitleFactory methods.
Change the obvious uses of castFrom*() to newFrom*() (if there is
a Phan suppression, a type check, or a method call on the result).
Change-Id: Ida4da75953cf3bca372a40dc88022443109ca0cb
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Unnecessary regex modifier. I agree with this inspection which flags
/s modifiers on regexes that don't use a dot.
* Property declared dynamically.
* Unused local variable. But it's acceptable for an unused local
variable to take the return value of a method under test, when it is
being tested for its side-effects. And it's acceptable for an unused
local variable to document unused list expansion elements, or the
nature of array keys in a foreach.
Change-Id: I067b5b45dd1138c00e7269b66d3d1385f202fe7f
|
|
|
|
|
| |
Bug: T201491
Change-Id: I5c9408c262f09c936525f35abfacfa92a193b791
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
It's one-class namespace and I know it's not great but:
- I hope to add more classes with the redesign of externallinks table
- It's not named very well either, it's a collection of URL-related
functionalities
- Making it clear LinkFilter is about external links, not internal or
interwiki or templatelinks etc.
Bug: T321882
Change-Id: I0dd530237f45e4fec786178ec03ee941c6bcd982
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is moderately messy.
Process was principally:
* xargs rg --files-with-matches '^use Title;' | grep 'php$' | \
xargs -P 1 -n 1 sed -i -z 's/use Title;/use MediaWiki\\Title\\Title;/1'
* rg --files-without-match 'MediaWiki\\Title\\Title;' . | grep 'php$' | \
xargs rg --files-with-matches 'Title\b' | \
xargs -P 1 -n 1 sed -i -z 's/\nuse /\nuse MediaWiki\\Title\\Title;\nuse /1'
* composer fix
Then manual fix-ups for a few files that don't have any use statements.
Bug: T166010
Follows-Up: Ia5d8cb759dc3bc9e9bbe217d0fb109e2f8c4101a
Change-Id: If8fc9d0d95fc1a114021e282a706fc3e7da3524b
|
|
|
|
|
| |
Bug: T326274
Change-Id: I837f7a7b0fad4353dbd670eec609fedfd0603af1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The first parameter returned from findVariantLink() is not the DB key,
which whitespaces should be replaced with underscores.
Also:
1. Replaced Title::makeTitleSafe with Title::makeTitle, invalid links
would be treated as plain text by the parser and can never hit this
code path. And the makeTitle function below is also using
Title::makeTitle.
2. Updated the document of findVariantLink().
Bug: T328477
Change-Id: I2b08edd90666e0fa4eafe91444a58806909b02d6
|
|
|
|
|
| |
Bug: T321882
Change-Id: I0b86acfdeaa3a2a0a14b7763fd088122820bafdc
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The problem this patch fixes:
- Step 1: Move an existing page A to a new title B.
- Step 2: Delete the redirect at the old title A.
- What happened: All the edits made to the page prior to the move
are gone from recent changes.
- What should have happened: all the edits made to the page prior
to the move are still in recent changes under the (now redlinked)
title A.
Contrary to that, moving a page with redirect suppression would
preserve the changes.
Bug: T140960
Bug: T307865
Change-Id: Ib52a9c657620275388012a778bc9d839dd740624
|
|
|
|
|
|
|
| |
This is to ensure that the configs being used are those
explicitly specified by constructor options.
Change-Id: I1ed3814f37ca74efc11c3984f5d18c717ee5de6b
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
MediaWiki generally only uses four levels:
* 'debug': Verbose information, e.g. during local dev, CI, and
in "Verbose" mode in production via WikimediaDebug.
* 'info': Diagnostics. Enabled for most channels even for production
traffic, though typically hidden in Logstash along with 'debug',
and instead reviewed in combination with other messages from the
same request when the request is investigated for a different reason.
* 'warning': Diagnostics,. Typically hidden in Logstash, except for
dashboards for component's own maintainers, to assess system health.
Warnings are rare but expected to some degree at scale.
* 'error': Something has gone wrong that should in theory not happen.
Typically included even in system-wide dashboards and sometimes used
for alerting.
Afaik we have no meaning associated with 'notice'. At WMF I found
no dashboards selecting it, no alerts using it, and no channels used
it as the threshold for including or discarding messages.
Instead, lower them to info(), or raise them to warning().
Change-Id: Ie927643d774ba696ec33c7e6b7023b1a1b831d12
|
|
|
|
|
|
| |
Unused as of June 2022 with e802062e11 (I0089fa01524924).
Change-Id: I51a30d7bc1550880cd44c1f1d4e104d0e9e7c2c0
|
|
|
|
|
|
|
|
| |
It is not worth breaking atomicity and delaying execution just to wait
for a few rows to replicate. This is similar to existing logic in
LinksDeletionUpdate.
Change-Id: I353dab14a439f93279d0dc7f4628eddf2fcde810
|
|
|
|
|
|
|
|
| |
Part one, none of these hooks are used in extensions deployed in
production. I skipped any hook that has silenced its deprecation
warnings.
Change-Id: Idf1fd12cc61ca30867dc9f8aeb1701fe035fc5ff
|
|
|
|
| |
Change-Id: Iac27cb4aa936cb494b3e491ce22c88c7fad375a1
|
|
|
|
|
|
|
|
|
|
| |
When setting causeAgent for jobs, be specific.
When creating parserOptions, call setRenderReason.
This allows us to capture statistics on what actions cause jobs,
renders, and cache writes.
Change-Id: Iaef64beadce1489bebb6bb00855c3ba6013a29d8
|
|
|
|
|
|
| |
They have already been deprecated and are unused.
Change-Id: I0d1a45df6b6cf6b144492e51cf6368d25c72565e
|
|
|
|
|
|
| |
It has been deprecated since 1.34 and it is unused.
Change-Id: Id2042eb7c2077c650c42aef9484ca31117a4ad0b
|
|
|
|
|
|
|
|
|
|
| |
Introduced in 2017 with I7f14b9ca2533032 (2e5eb693) but remains
unused at WMF, and disabled by default.
Follows-up I62107789fa (9e49260fc958) which added reap to LinkCache
test cases in 2021.
Change-Id: I0654c29a671467dd6b366f462d1c09b90a273413
|
|
|
|
|
|
|
|
|
| |
This only supports WRITE_BOTH for now, the rest will be implemented.
Tested locally, works fine.
Bug: T318606
Change-Id: I6f898aa89f7d36f3f8a4eb8c23706c64a90896b0
|
|
|
|
|
|
|
|
| |
Introduced in PHP 7.1. Because it's shorter and looks nice.
I used regex replacement.
Change-Id: I0555e199d126cd44501f859cb4589f8bd49694da
|
|\ |
|
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When the setting for sharding is on, the script actually flush all
values to the first row. Since this is being ran regularly in
production, it has been causing drifts between values and reality.
Tested locally, works fine.
Bug: T315693
Change-Id: Id9fe16eecd153b4ba2b7d28baadec3a9a44b4ee1
|
|\ \
| |/
|/| |
|
| |
| |
| |
| |
| |
| | |
...because search updates are disabled by config.
Change-Id: Ie128a5e669a933c9f6c7356839fcbb05e30bfe64
|
| |
| |
| |
| |
| |
| |
| |
| | |
I dropped the columns and these paths started to fatal. Nothing super
complicated.
Bug: T312865
Change-Id: Ic44edc5b4a2d8da924ba6176b619715e4780bddd
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
- 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
|
| | |
| | |
| | |
| | |
| | |
| | | |
The class has been deprecated since 1.34 and it is unused.
Change-Id: If62eb4d7526f0238a5ddbeb650396ce604799d20
|
| | |
| | |
| | |
| | |
| | |
| | | |
It has been deprecated since 1.35 and it is unused.
Change-Id: I2d5cf9e8a7401d7126e9deed20b3d071ca3998f6
|
|/ /
| |
| |
| |
| |
| | |
It has been deprecated since 1.28 and it is unused.
Change-Id: I68ade12cf81d0097079b70ea6526d32cb2dda8bc
|
| |
| |
| |
| |
| |
| |
| | |
Keep the $unused for now since, while it is internal, there are
actually callers in test suites of various extensions.
Change-Id: Ib56298c98b26b22568abcd71bc844651b120fe01
|
| |
| |
| |
| |
| |
| | |
Has not been used for a while.
Change-Id: I0089fa01524924a092a616ebfa190a360ff957b3
|
| |
| |
| |
| |
| |
| |
| |
| | |
This would be useful in cases that lots of edits happen at the same time
and this would reduce the time waiting to get the row lock.
Bug: T306589
Change-Id: I3b869e3b85dfd66575390ef4247f2f81f19c878e
|
|\ \
| |/
|/| |
|
| |
| |
| |
| | |
Change-Id: I42aab149559e3e899cde6c77af76c66936ed0ef0
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Callback style iteration made sense before generators existed, but
generators make for simpler code. The "call method" variants made
sense before closures existed but defeat static analysis.
So, in LBFactory:
* Add ILBFactory::getAllLBs()
* Deprecate ILBFactory::forEachLB()
* Remove LBFactory::forEachLBCallMethod(), was protected.
* Add LBFactory::getLBsForOwner(), which is protected and has the
internal interface in @return. Adding a new abstract method breaks
Wikibase tests despite LBFactory not being stable to extend.
* Migrate callers. Generators allow you to return/break from the middle
of the loop, which implies a little rearrangement for some callers.
In LoadBalancer, connections supposedly of type IDatabase were
routinely type-hinted as Database in closure parameters so that methods
could be called that were not in the interface. So it's convenient to
get rid of public iteration methods entirely in favour of private
methods returning Database[].
* Hard-deprecate ILoadBalancerForOwner::forEachOpenConnection()
and replace it with a private generator method since nothing called
it externally except for core tests.
* Hard-deprecate ILoadBalancerForOwner::forEachOpenPrimaryConnection()
and replace it with a private generator. DeferredUpdates needed it for
iterating over IDatabase::explicitTrxActive(), so add
ILoadBalancer::explicitTrxActive() as a replacement.
* Replace private method LoadBalancer::forEachOpenReplicaConnection()
with a generator.
Depends-On: If0b382231e27d6d1197fb7b6aef6ab50335df4e5
Change-Id: I64514e77b9bfe737be5b12e1d3c9c49976bb522f
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Now largely automated:
VARS=$(grep -o "'[A-Za-z0-9_]*'" includes/MainConfigNames.php | \
tr "\n" '|' | sed "s/|$/\n/;s/'//g")
sed -i -E "s/'($VARS)'/MainConfigNames::\1/g" \
$(grep -ERIl "'($VARS)'" includes/)
Then git add -p with lots of error-prone manual checking. Then
semi-manually add all the necessary "use" lines:
vim $(grep -L 'use MediaWiki\\MainConfigNames;' \
$(git diff --cached --name-only --diff-filter=M HEAD^))
I didn't bother fixing lines that were over 100 characters unless they
were over 120 and triggered phpcs.
Bug: T305805
Change-Id: I74e0ab511abecb276717ad4276a124760a268147
|