Page MenuHomePhabricator

WikiPage::doEditContent falls back to $wgUser
Closed, ResolvedPublic

Assigned To
Authored By
DannyS712
Jun 15 2020, 10:54 PM
Referenced Files
None

Description

Since it is no longer going to be removed in T250638: Replace uses and hard deprecate WikiPage::doEditContent and PageUpdater::getStatus, and that task appears to have concluded that it should be un-deprecated, the use of $wgUser if a user isn't passed needs to be remedied

We decided to do this by replacing the method with a similar one that requires a user to be provided - we want to update callers to the new method and then hard deprecate and later remove the old one

doEditContent (old method)
public function doEditContent(
	Content $content, $summary, $flags = 0, $originalRevId = false,
	Authority $performer = null, $serialFormat = null, $tags = [], $undidRevId = 0
)
doUserEditContent (new method)
public function doUserEditContent(
	Content $content, Authority $performer, $summary, $flags = 0,
	$originalRevId = false, $tags = [], $undidRevId = 0
)

This new method was added in 1.36, so extensions that are updated to call it need to either require 1.36+ or newer, or have logic to vary which method is called based on the version.

To update callers:

Then

MLEB*: As a reminder: extensions in the "MediaWiki Language Extension Bundle" need to continue supporting 1.35, so we can't just bump the required version of mediawiki.

Details

SubjectRepoBranchLines +/-
mediawiki/coremaster+9 -3
mediawiki/extensions/Translatemaster+1 -1
mediawiki/extensions/Translatemaster+173 -47
mediawiki/extensions/Babelmaster+20 -7
mediawiki/extensions/CentralNoticemaster+20 -9
mediawiki/extensions/SecurePollmaster+23 -8
mediawiki/coremaster+505 -316
mediawiki/extensions/PageTriagemaster+14 -6
mediawiki/extensions/FlaggedRevsmaster+7 -8
mediawiki/extensions/Echomaster+19 -13
mediawiki/extensions/MassMessagemaster+27 -18
mediawiki/extensions/WikimediaMaintenancemaster+13 -5
mediawiki/extensions/NewUserMessagemaster+5 -6
mediawiki/extensions/Flowmaster+21 -23
mediawiki/extensions/Wikibasemaster+35 -21
mediawiki/extensions/LiquidThreadsmaster+7 -2
mediawiki/extensions/UploadWizardmaster+10 -10
mediawiki/extensions/SpamBlacklistmaster+1 -4
mediawiki/extensions/TemplateStylesmaster+2 -2
mediawiki/extensions/Scribuntomaster+9 -4
mediawiki/extensions/ORESmaster+3 -5
mediawiki/extensions/CheckUsermaster+6 -2
mediawiki/extensions/GWToolsetmaster+3 -5
mediawiki/extensions/FileImportermaster+5 -5
mediawiki/coremaster+200 -43
Show related patches Customize query in gerrit

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes

Change 607073 merged by jenkins-bot:
[mediawiki/core@master] WikiPage: add interim replacement for WikiPage::doEditContent() requiring $user

https://gerrit.wikimedia.org/r/607073

Change 701205 had a related patch set uploaded (by DannyS712; author: DannyS712):

[mediawiki/extensions/SpamBlacklist@master] Use WikiPage::doUserEditContent() instead of ::doEditContent()

https://gerrit.wikimedia.org/r/701205

Change 701226 had a related patch set uploaded (by DannyS712; author: DannyS712):

[mediawiki/extensions/PageTriage@master] Use WikiPage::doUserEditContent() instead of ::doEditContent()

https://gerrit.wikimedia.org/r/701226

Change 701227 had a related patch set uploaded (by DannyS712; author: DannyS712):

[mediawiki/extensions/ORES@master] Use WikiPage::doUserEditContent() instead of ::doEditContent()

https://gerrit.wikimedia.org/r/701227

Change 701228 had a related patch set uploaded (by DannyS712; author: DannyS712):

[mediawiki/extensions/GWToolset@master] Use WikiPage::doUserEditContent() instead of ::doEditContent()

https://gerrit.wikimedia.org/r/701228

Change 701229 had a related patch set uploaded (by DannyS712; author: DannyS712):

[mediawiki/extensions/FileImporter@master] Use WikiPage::doUserEditContent() instead of ::doEditContent()

https://gerrit.wikimedia.org/r/701229

Change 701230 had a related patch set uploaded (by DannyS712; author: DannyS712):

[mediawiki/extensions/CheckUser@master] Use WikiPage::doUserEditContent() instead of ::doEditContent()

https://gerrit.wikimedia.org/r/701230

Change 701231 had a related patch set uploaded (by DannyS712; author: DannyS712):

[mediawiki/extensions/LiquidThreads@master] Use WikiPage::doUserEditContent() instead of ::doEditContent()

https://gerrit.wikimedia.org/r/701231

Change 701232 had a related patch set uploaded (by DannyS712; author: DannyS712):

[mediawiki/extensions/FlaggedRevs@master] Use WikiPage::doUserEditContent() instead of ::doEditContent()

https://gerrit.wikimedia.org/r/701232

Change 701233 had a related patch set uploaded (by DannyS712; author: DannyS712):

[mediawiki/extensions/SecurePoll@master] Use WikiPage::doUserEditContent() instead of ::doEditContent()

https://gerrit.wikimedia.org/r/701233

Change 701234 had a related patch set uploaded (by DannyS712; author: DannyS712):

[mediawiki/extensions/CentralNotice@master] Use WikiPage::doUserEditContent() instead of ::doEditContent()

https://gerrit.wikimedia.org/r/701234

Change 701235 had a related patch set uploaded (by DannyS712; author: DannyS712):

[mediawiki/extensions/Echo@master] Use WikiPage::doUserEditContent() instead of ::doEditContent()

https://gerrit.wikimedia.org/r/701235

Change 701237 had a related patch set uploaded (by DannyS712; author: DannyS712):

[mediawiki/extensions/Flow@master] Use WikiPage::doUserEditContent() instead of ::doEditContent()

https://gerrit.wikimedia.org/r/701237

Change 701243 had a related patch set uploaded (by DannyS712; author: DannyS712):

[mediawiki/extensions/Wikibase@master] Use WikiPage::doUserEditContent() instead of ::doEditContent()

https://gerrit.wikimedia.org/r/701243

DannyS712 added a subscriber: Clarakosi.

@Clarakosi I've moved this back to code review needed since I've started sending patches to update extensions

Change 701245 had a related patch set uploaded (by DannyS712; author: DannyS712):

[mediawiki/extensions/MassMessage@master] Use WikiPage::doUserEditContent() instead of ::doEditContent()

https://gerrit.wikimedia.org/r/701245

Change 701266 had a related patch set uploaded (by DannyS712; author: DannyS712):

[mediawiki/extensions/NewUserMessage@master] Use WikiPage::doUserEditContent() instead of ::doEditContent()

https://gerrit.wikimedia.org/r/701266

Change 701267 had a related patch set uploaded (by DannyS712; author: DannyS712):

[mediawiki/extensions/Scribunto@master] Use WikiPage::doUserEditContent() instead of ::doEditContent()

https://gerrit.wikimedia.org/r/701267

Change 701268 had a related patch set uploaded (by DannyS712; author: DannyS712):

[mediawiki/extensions/TemplateStyles@master] Use WikiPage::doUserEditContent() instead of ::doEditContent()

https://gerrit.wikimedia.org/r/701268

Change 701269 had a related patch set uploaded (by DannyS712; author: DannyS712):

[mediawiki/extensions/UploadWizard@master] Use WikiPage::doUserEditContent() instead of ::doEditContent()

https://gerrit.wikimedia.org/r/701269

Change 701270 had a related patch set uploaded (by DannyS712; author: DannyS712):

[mediawiki/extensions/WikimediaMaintenance@master] Use WikiPage::doUserEditContent() instead of ::doEditContent()

https://gerrit.wikimedia.org/r/701270

Change 701271 had a related patch set uploaded (by DannyS712; author: DannyS712):

[mediawiki/extensions/Translate@master] Try to use WikiPage::doUserEditContent() instead of ::doEditContent()

https://gerrit.wikimedia.org/r/701271

Change 701272 had a related patch set uploaded (by DannyS712; author: DannyS712):

[mediawiki/extensions/Babel@master] Try to use WikiPage::doUserEditContent() instead of ::doEditContent()

https://gerrit.wikimedia.org/r/701272

Change 701229 merged by jenkins-bot:

[mediawiki/extensions/FileImporter@master] Use WikiPage::doUserEditContent() instead of ::doEditContent()

https://gerrit.wikimedia.org/r/701229

Change 701277 had a related patch set uploaded (by DannyS712; author: DannyS712):

[mediawiki/core@master] Use WikiPage::doUserEditContent() instead of ::doEditContent()

https://gerrit.wikimedia.org/r/701277

Change 701230 merged by jenkins-bot:

[mediawiki/extensions/CheckUser@master] Use WikiPage::doUserEditContent() instead of ::doEditContent()

https://gerrit.wikimedia.org/r/701230

Change 701228 merged by jenkins-bot:

[mediawiki/extensions/GWToolset@master] Use WikiPage::doUserEditContent() instead of ::doEditContent()

https://gerrit.wikimedia.org/r/701228

Change 701227 merged by jenkins-bot:

[mediawiki/extensions/ORES@master] Use WikiPage::doUserEditContent() instead of ::doEditContent()

https://gerrit.wikimedia.org/r/701227

Change 701267 merged by jenkins-bot:

[mediawiki/extensions/Scribunto@master] Use WikiPage::doUserEditContent() instead of ::doEditContent()

https://gerrit.wikimedia.org/r/701267

Change 701205 merged by jenkins-bot:

[mediawiki/extensions/SpamBlacklist@master] Use WikiPage::doUserEditContent() instead of ::doEditContent()

https://gerrit.wikimedia.org/r/701205

Change 701268 merged by jenkins-bot:

[mediawiki/extensions/TemplateStyles@master] Use WikiPage::doUserEditContent() instead of ::doEditContent()

https://gerrit.wikimedia.org/r/701268

Change 701269 merged by jenkins-bot:

[mediawiki/extensions/UploadWizard@master] Use WikiPage::doUserEditContent() instead of ::doEditContent()

https://gerrit.wikimedia.org/r/701269

Change 701231 merged by jenkins-bot:

[mediawiki/extensions/LiquidThreads@master] Use WikiPage::doUserEditContent() instead of ::doEditContent()

https://gerrit.wikimedia.org/r/701231

Change 701243 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] Use WikiPage::doUserEditContent() instead of ::doEditContent()

https://gerrit.wikimedia.org/r/701243

Change 701271 merged by jenkins-bot:

[mediawiki/extensions/Translate@master] Try to use WikiPage::doUserEditContent() instead of ::doEditContent()

https://gerrit.wikimedia.org/r/701271

Change 701237 merged by jenkins-bot:

[mediawiki/extensions/Flow@master] Use WikiPage::doUserEditContent() instead of ::doEditContent()

https://gerrit.wikimedia.org/r/701237

Change 701235 merged by jenkins-bot:

[mediawiki/extensions/Echo@master] Use WikiPage::doUserEditContent() instead of ::doEditContent()

https://gerrit.wikimedia.org/r/701235

Change 701245 merged by jenkins-bot:

[mediawiki/extensions/MassMessage@master] Use WikiPage::doUserEditContent() instead of ::doEditContent()

https://gerrit.wikimedia.org/r/701245

Change 701266 merged by jenkins-bot:

[mediawiki/extensions/NewUserMessage@master] Use WikiPage::doUserEditContent() instead of ::doEditContent()

https://gerrit.wikimedia.org/r/701266

Change 701232 merged by jenkins-bot:

[mediawiki/extensions/FlaggedRevs@master] Use WikiPage::doUserEditContent() instead of ::doEditContent()

https://gerrit.wikimedia.org/r/701232

Change 701226 merged by jenkins-bot:

[mediawiki/extensions/PageTriage@master] Use WikiPage::doUserEditContent() instead of ::doEditContent()

https://gerrit.wikimedia.org/r/701226

Change 701270 merged by jenkins-bot:

[mediawiki/extensions/WikimediaMaintenance@master] Use WikiPage::doUserEditContent() instead of ::doEditContent()

https://gerrit.wikimedia.org/r/701270

Change 701277 merged by jenkins-bot:

[mediawiki/core@master] Use WikiPage::doUserEditContent() instead of ::doEditContent()

https://gerrit.wikimedia.org/r/701277

Change 701233 merged by jenkins-bot:

[mediawiki/extensions/SecurePoll@master] Use WikiPage::doUserEditContent() instead of ::doEditContent()

https://gerrit.wikimedia.org/r/701233

Change 701234 merged by jenkins-bot:

[mediawiki/extensions/CentralNotice@master] Use WikiPage::doUserEditContent() instead of ::doEditContent()

https://gerrit.wikimedia.org/r/701234

Change 701272 merged by jenkins-bot:

[mediawiki/extensions/Babel@master] Try to use WikiPage::doUserEditContent() instead of ::doEditContent()

https://gerrit.wikimedia.org/r/701272

Change 701725 had a related patch set uploaded (by DannyS712; author: DannyS712):

[mediawiki/core@master] Hard deprecate WikiPage::doEditContent

https://gerrit.wikimedia.org/r/701725

Change 702007 had a related patch set uploaded (by DannyS712; author: DannyS712):

[mediawiki/extensions/Translate@master] PageTranslationHooksTest: fix missed use of WikiPage::doEditContent

https://gerrit.wikimedia.org/r/702007

Change 702007 merged by jenkins-bot:

[mediawiki/extensions/Translate@master] PageTranslationHooksTest: fix missed use of WikiPage::doEditContent

https://gerrit.wikimedia.org/r/702007

The core patch is ready to go, but cannot be merged until after CentralNotice syncs the wmf_deploy branch to include the latest changes to the master branch. @AndyRussG what is the process for this / do you know how frequently this occurs?

The core patch is ready to go, but cannot be merged until after CentralNotice syncs the wmf_deploy branch to include the latest changes to the master branch. @AndyRussG what is the process for this / do you know how frequently this occurs?

So this should have been included in the latest sync, but there were some issues with that, T281153#7182764
Will merge the core patch after the 1.37.0-wmf.12 train is fully deployed on group 2 and stable, just to be on the safe side (so once T281153: 1.37.0-wmf.12 deployment blockers is resolved)

DannyS712 claimed this task.
DannyS712 updated the task description. (Show Details)
DannyS712 removed a project: Patch-For-Review.

Patch to hard deprecate WikiPage::doEditContent is merging now, filed T286139 for removal in 1.38

Change 701725 merged by jenkins-bot:

[mediawiki/core@master] Hard deprecate WikiPage::doEditContent

https://gerrit.wikimedia.org/r/701725