Switch the callers to the standard Maintenance::waitForReplication() method.
Avoid using LoadBalancer::waitFor(), which will made internal soon.
Bug: T326274
Change-Id: Idf0562eb33d90ff70eb3a7d5d7f54da944423d27
It's already wrapped in a small batch but if the table is large, this
would not work.
Adding a major batch to limit the rows scanned drastically makes it
faster. I have been running this in production and it works like a charm
on a table with > 300M rows
Bug: T310428
Change-Id: I7f63d2d76fea0db64e48dbcc1f95419df4492e7d
Replaced WikiPage::newFromID with newFromTitle,
because a Title object exists and could be reused
Bug: T297688
Change-Id: Ide30f259477ed8e0b48df31f5a23cafeb38d7316
Moved the factory deeper into the code right before the one usage it
still needed a full user object
Narrow done method arguments from User to UserIdentity
and use the identity directly
Change-Id: Ic118f23ef504c7fda892480df61ea68c10915f78
The global function wfWikiID() is deprecated since 1.35 and it's usages
should be replaced with WikiMap::getCurrentWikiId().
Bug: T298059
Change-Id: Ia8cbc992eb80ee6d531cf11bdf2bc06181bce8b0
Phan says:
maintenance/backfillUnreadWikis.php:51 PhanTypeMismatchArgumentNullable Argument 1 ($userIdentity) is $lookup->localUserFromCentralId($row->euw_user, CentralIdLookup::AUDIENCE_RAW) of type ?\MediaWiki\DAO\WikiAwareEntity|?\MediaWiki\User\UserIdentity but \MediaWiki\User\UserFactory::newFromUserIdentity() takes \MediaWiki\User\UserIdentity defined at ../../includes/user/UserFactory.php:166 (expected type to be non-nullable)
Follow-up to 64531785a6.
Change-Id: I261e87d16bc23e9f1b5d3385553c5899632c9127
::doUserEditContent() is available since 1.36 as a replacement
for ::doEditContent(), which has been deprecated. Extension
already requires MediaWiki 1.37+, so the method is always
available.
Bug: T255507
Change-Id: Iee5de356dbccd453a3083e0a58859b4cd83a946b
Remove using of User::addGroup since this method will be hard-deprecated. Now it is soft-deprecated
Bug: T276094
Change-Id: Ib074ca906d31a02ca241296b32416ffb30e90e4f
isRegistered is part of the slick UserIdentity interface, i.e.
it's the more "canonical" form. This change makes it a bit
easier to move away from using the huge (4000+ LOC) User class
everywhere, in favor of the UserIdentity interface, where
possible.
This patch is meant as a small step towards this goal. I tried
to replace some usages of User type hints already, but prefer
to go in small, incremental steps.
Change-Id: I039c7a18672dfb6ea9507752bce9ea754babd690
The following sniffs are failing and were disabled:
* MediaWiki.Commenting.FunctionComment.MissingDocumentationPrivate
* MediaWiki.Commenting.FunctionComment.MissingReturn
* MediaWiki.Usage.ForbiddenFunctions.isset
* MediaWiki.Usage.PHPUnitDeprecatedMethods.AssertInternalTypeGeneric
Additional changes:
* Also sorted "composer fix" command to run phpcbf last.
Change-Id: I29416247ff3736799543926813beaf4afd569a6e
PHP doesn't care much about the name (in terms of case sensitivity)
but I think we should make sure the names of the method should be as
they're in their definition.
Change-Id: I6e38d8be64efaec4200471f2d3007275d7ddecec
Class Revision is deprecated and in this patch, replaces
usage with appropriate classes; RevisionRecord, RevisionStore,
etc.
Bug: T221163
Change-Id: Icfc85167a636bef95daab236ab80113c1a3cf41b