Page MenuHomePhabricator

Hard-deprecate Title::moveTo
Closed, ResolvedPublic

Description

Title::moveTo performs permission checks against the $wgUser global. This should be moved into the MovePage application logic class. Title::moveTo has been soft-deprecated since 1.25, it should now be hard-deprecated by having it call wfDeprecated( __METHOD__, '1.25' ).

As a second step, all callers to this method, in core and in extensions maintained by wmf, should be removed.

Rationale: Getting rid Title::moveTo would remove a dependency of Title on User, which is a step towards solving the circular dependency between these two classes.

Details

Related Gerrit Patches:
mediawiki/core : masterHard-deprecate Title::moveTo and friends
mediawiki/core : masterHard-deprecate Title-moveTo

Event Timeline

daniel created this task.Nov 5 2018, 7:54 PM
daniel removed daniel as the assignee of this task.Apr 1 2019, 2:14 PM
daniel renamed this task from Deprecate Title::moveTo to Hard-deprecate Title::moveTo.Apr 1 2019, 7:27 PM
daniel updated the task description. (Show Details)

Change 504059 had a related patch set uploaded (by simetrical; owner: simetrical):
[mediawiki/core@master] Hard-deprecate Title-moveTo

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

So moveTo() does a couple of extra things that MovePage doesn't. It calls spreadAnyEditBlock() if there's an error, and honors the suppressredirect permission. Why are these not done in MovePage proper? As it stands, it considerably complicates porting the existing users, which are fairly numerous.

So moveTo() does a couple of extra things that MovePage doesn't. It calls spreadAnyEditBlock() if there's an error, and honors the suppressredirect permission. Why are these not done in MovePage proper?

That's a very good question. I'd say it should be. I can't imagine why it should not.

Change 504338 had a related patch set uploaded (by simetrical; owner: simetrical):
[mediawiki/core@master] Hard-deprecate Title::moveTo and friends

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

Change 504059 abandoned by simetrical:
Hard-deprecate Title-moveTo

Reason:
I changed the Change-Id by mistake. For further work on this, please see: https://gerrit.wikimedia.org/r/504338

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

Change 504338 merged by jenkins-bot:
[mediawiki/core@master] Hard-deprecate Title::moveTo and friends

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

daniel closed this task as Resolved.May 29 2019, 9:15 AM