| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Change-Id: I453ce3148a46fcb9cc5c685cee92274e0cb4f98a
|
|
|
|
|
| |
Bug: T361023
Change-Id: Ibf1c93ddbf8f680e8fb9442816f6fed94a069c0a
|
|
|
|
| |
Change-Id: I03c068c4bf098ab073989a0ea32a0f87fe878727
|
|
|
|
|
|
|
|
|
| |
This patch introduces a namespace, MediaWiki\RevisionList, and adds it
to the related classes and establishes class aliases marked as
deprecated since version 1.43.
Bug: T353458
Change-Id: I1614a00dd8973c5300d95317a725cbe46e14d1af
|
|
|
|
|
|
|
|
|
|
| |
This patch introduces a new namespace declaration,
MediaWiki\Xml and adds Xml and XmlSelect to it
and establishes class aliases marked as deprecated
since version 1.43.
Bug: T353458
Change-Id: I45cccd540b6e15f267d3ab588a064fbeb719d921
|
|
|
|
| |
Change-Id: If4104cc2328a86eb2b588a34426839086c7f6ebb
|
|
|
|
|
| |
Bug: T353458
Change-Id: Ic3f3168ef17113f5fb3ec11e0a47f52d65eefba9
|
|
|
|
|
|
|
|
|
|
|
| |
If we are serious about getting rid of wfGetDB(), we should start
replcing callers with proper replacement.
These classes don't have any injection so it doesn't make sense to
introduce it for this specific usecase.
Bug: T330641
Change-Id: I645f67324d441288c63787c7e42390b59106c585
|
|
|
|
|
| |
Bug: T353458
Change-Id: I4dbef138fd0110c14c70214282519189d70c94fb
|
|\
| |
| |
| | |
getConnectionProvider()"
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Some less trivial cases. Also update variable names.
This doesn't really change anything, but I hope it helps promote
getConnectionProvider() as the common way to do this.
Follow-up to 8604c384f624273f46b653ec252ffaed30e6ff89.
Change-Id: I6657d783375fac5c7fa856b884ff1fb09285e94c
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Found via (?<!IDBAccessObject)::READ_
We are planning to deprecate and remove implementing IDBAccessObject
interface just to use the constants.
Bug: T354194
Change-Id: I89d442fa493b8e5332ce118e5bf13f13b8dd3477
|
|\ \
| |/
|/| |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This revision updates RevDelArchivedRevisionItem to use the
IConnectionProvider::getPrimaryDatabase method instead of wfGetDB,
which is deprecated in MediaWiki 1.39. It also adds type hints and annotations for clearer codebase and better maintainability.
- Add typing to the getIdField and getId methods.
- Improve documentation for constructor and setBits method.
Change-Id: Ic914c7afe8bdf0731a1d4f68aeefdfe77b5503ae
|
|/
|
|
|
|
|
|
|
|
|
|
| |
Update cases where one of the IConnectionProvider methods is called
immediately.
This doesn't really change anything, but I hope it helps promote
getConnectionProvider() as the common way to do this.
Follow-up to 8604c384f624273f46b653ec252ffaed30e6ff89.
Change-Id: Id0e7d02bab0c570343c2b1f03c70b44ee39db112
|
|
|
|
|
| |
Bug: T328220
Change-Id: Iba90f7f9b5766bccc05380d040138d74d5e9558a
|
|
|
|
|
| |
Bug: T328220
Change-Id: Ie9b56bcf5e962e275d80570cad98d676da505894
|
|
|
|
|
| |
Bug: T166010
Change-Id: Ibd40734b96fd2900e3ce12239d09becfb4150059
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This function is uber-deprecated, meaning even its replacement is
deprecated, We have already migrated in static functions and more.
In this batch, all calls have been migrated that there is already a call
to MediaWikiServices::getInstance() making the migration easier. Of
course in most cases, they should eventually turn into proper service
injection but this at least makes it clear what services should be
injected.
Also removing "category" group since we are removing all groups except a
handful from mw (see T263127 for more information).
Bug: T330641
Change-Id: I90cd35ee45a37eb6e6bf7a531cc8f75effbd0328
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Done via
'([A-Za-z_\.]+) ?(=|!=|<|<=|>|>=) ?' . (\$db(?:r|w|))->addQuotes\( (.+?) \)
to:
$3->expr\( '$1', '$2', $4 \)
And
'([A-Za-z_\.]+) IS NULL OR ([A-Za-z_\.]+) ?(=|!=|<|<=|>|>=) ?' . (\$db(?:r|w|))->addQuotes\( (.+?) \)
to:
$4->expr( '$1', '=', null )->or\( '$2', '$3', $5 \)
Bug: T210206
Change-Id: I109bf2a712bdefa9e074f775b1bee41ac5b9d665
|
|
|
|
|
|
|
|
| |
To deprecate ::modifyDisplayQuery() and unblock a lot of migrations to
SelectQueryBuilder.
Bug: T344971
Change-Id: Icb9265644bdbc0b30e2a419ae0103f0e78fe90bd
|
|
|
|
|
|
|
|
| |
I fixed some edge cases in the script that migrates to SQB and it
managed to fix these now.
Bug: T344971
Change-Id: I00cc9a6660d9bd4c64c976121b2121ccd7aae1f0
|
|
|
|
|
|
|
| |
SpecialPageFactory is already here, but none of the others were yet.
Bug: T166010
Change-Id: I9689bf0a1ab329625e23669b99f019b96295fffd
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
wfGetDB() has been deprecated since 1.39 (or more?) and it's better to
inject LBF and call ::getReplicaDatabase() or ::getPrimaryDatabase()
which is not straightforward in classes but for static functions, there
is no way to inject the method so we can simply call
MediaWikiServices::getInstance()->getDBLoadBalancerFactory()
While I was here, I migrated one call to SelectQueryBuilder.
Bug: T330641
Change-Id: Idd2278cef647035dce05a2d461a620e145fe1167
|
|
|
|
|
|
|
|
|
|
| |
This class is used heavily basically everywhere, moving it to Utils
wouldn't make much sense. Also with this change, we can move
StatusValue to MediaWiki\Status as well.
Bug: T321882
Depends-On: I5f89ecf27ce1471a74f31c6018806461781213c3
Change-Id: I04c1dcf5129df437589149f0f3e284974d7c98fa
|
|
|
|
|
|
|
| |
So much can be cleaned up with this
Bug: T311866
Change-Id: Ia4d46679c540c731b2ae8da2f8022fd6f5b931a4
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Using a php parser written on top of ANTLR4, done semi-automatically.
I checked everything and made adjustments.
Bug: T311866
Change-Id: I6150c6909bce8f3dbd745a26380cc0af9d9c547f
|
|\ \ |
|
| |/
| |
| |
| |
| |
| |
| | |
Not use RevisionRecord constants for LogPage or File,
even the number are the same, the context should be the match
Change-Id: Icf50f48fa63144c5ac798e7453faf9cd0a1b706a
|
|/
|
|
|
|
|
|
| |
Not used anywhere else as a method. It really is just a constant.
This goes along with Icf50f48. Can be merged in any order.
Change-Id: I8270df212193c10ad35e0b735cca67b2307e535e
|
|
|
|
|
| |
Bug: T330640
Change-Id: I094eea810886b13d832be575d9b9df8f8e4a77ea
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This follows up change I608566700c, which was mainly generated by a
script. Most of the clean up here is fixing cases where it seems the
script for some reason collapsed multi-line arrays into single-line ones
and/or removed spaces after commas. A handful of other improvements are
included too (split merged conditions into ->where()->andWhere(), use
buildComparison()). In RevDelArchiveItem, a comment is restored that I
assume was removed accidentally (perhaps because the script didn’t
expect comments inside the conditions).
Bug: T330640
Change-Id: If27bafb12fdaa05d3dc1ae6da820e1630ae2742e
Follows-Up: I608566700c6d737ee986bf47dda87effc69614d6
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Inappropriate @inheritDoc usage. Arguably all @inheritDoc is
inappropriate but these are the ones PHPStorm flags as misleading
due to the method not being inherited.
* Doc comment type does not match actual argument/return type.
* I replaced "@return void|never" with "@return void" since never means
never, it doesn't make sense for it to be conditional. If a method
can return (even if that is unlikely) then @return contains the type
that it returns. "@return never" means that there is no such type
because the method never returns.
* Incomplete/partial/broken doc tags
Change-Id: Ide86bd6d2b44387f37d234c2b059d6fbc42ec962
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
Bug: T321882
Change-Id: I5dc1f7e9c303cd3f5b9dd7010d6bb470d8400a18
|
|
|
|
|
|
|
|
|
|
|
| |
Avoid code duplication and
allows to use the new styling if Icfb46d9 (T327538) gets merged
Remove duplication of span.history-deleted on Special:EditTags - before
this change a span.history-deleted element was nested inside another
span.history-deleted element and after this change it is not.
Change-Id: I2e27bd8e0bcca47a7734fcb6ee28c0d1e6bb5896
|
|
|
|
|
|
|
| |
Creation of dynamic property Status::$itemStatuses is deprecated
Bug: T314099
Change-Id: I5fc1496aa38502143a3511a6a8a110eb9446a2a9
|
|
|
|
|
|
|
|
| |
These exceptions are not documented with @throws and they're really not
meant to be caught.
Bug: T86704
Change-Id: I07f32e42c6fd4bc8785bac91547858f15a9fc2a8
|
|
|
|
|
|
|
|
|
| |
Unused since Idbb5a5a.
Note it never worked because of a misplaced } at the end.
Bug: T238374
Change-Id: Ic8759a78d02fb5d3d600443445ba5122d512794b
|
|
|
|
|
|
|
|
|
|
| |
so that extensions (i.e. CheckUser) can implement their own comment
store without having a lot of code duplication
basically the comment store version of I3a6486532f2ef36
Bug: T233004
Change-Id: Ib40f99e00a514d41776ce521baf113e46d37e9cd
|
|
|
|
|
| |
Bug: T324906
Change-Id: I0db8521f5ea0266a41687c46d7466a97fbc21742
|
|
|
|
|
|
|
| |
This feels like a no-brainer unless I'm missing something obvious
Bug: T321882
Change-Id: Id49c3d0dd6ea4593211048850856b5b8e05a8fb3
|
|
|
|
|
|
| |
It has been deprecated since 1.37 and it is unused.
Change-Id: I9f6ff3a656637528ad2f76cbd77e6980737e03c3
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Sorting on log_id must not give a result in time order,
because maintenance scripts can insert newer ids with older timestamps.
When only sorting for log_timestamp the result is not stable,
because for items with same timestamp the order is not defined.
For Special:Log the same timestamp gives problems on pagination
Bug: T305590
Change-Id: Ic0c2ebd19ee6a8aa570c5a12a92b31008135491c
|
|/
|
|
|
|
|
|
| |
Introduced in PHP 7.1. Because it's shorter and looks nice.
I used regex replacement.
Change-Id: I0555e199d126cd44501f859cb4589f8bd49694da
|