Page MenuHomePhabricator

WikiPage::doEditContent falls back to $wgUser
Open, MediumPublic

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

Current signature:

public function doEditContent(
	Content $content, $summary, $flags = 0, $originalRevId = false,
	User $user = null, $serialFormat = null, $tags = [], $undidRevId = 0
)

Target signature (eventually):

public function doEditContent(
	Content $content, User $user, $summary, $flags = 0,
	$originalRevId = false, $serialFormat = null, $tags = [], $undidRevId = 0
)

This could also be done by introducing ::editContent rather than needing to support two signatures

Event Timeline

DannyS712 created this task.

Given how many uses there are, support for the new signature needs to be added as soon as possible

Change 607073 had a related patch set uploaded (by Majavah; owner: Majavah):
[mediawiki/core@master] EditPage: add alternative method signature for doEditContent() requiring $user

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

daniel lowered the priority of this task from High to Medium.Sep 6 2020, 8:02 PM

@Majavah can you please rebase your patch to fix the merge conflicts, and ensure the tests pass? This is one of the remaining uses of $wgUser in core

@Majavah can you please rebase your patch to fix the merge conflicts, and ensure the tests pass? This is one of the remaining uses of $wgUser in core

I apologise, I've been busy with IRL issues recently and haven't found time to sit down and get this done. I'll try to get this done next week.

@Majavah can you please rebase your patch to fix the merge conflicts, and ensure the tests pass? This is one of the remaining uses of $wgUser in core

I apologise, I've been busy with IRL issues recently and haven't found time to sit down and get this done. I'll try to get this done next week.

{{ping}}

@Majavah can you please rebase your patch to fix the merge conflicts, and ensure the tests pass? This is one of the remaining uses of $wgUser in core

I apologise, I've been busy with IRL issues recently and haven't found time to sit down and get this done. I'll try to get this done next week.

{{ping}}

This was done some time ago, just forgot to comment here

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

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