Page MenuHomePhabricator

Remove unused Title::nameOf in MediaWiki Core
Closed, ResolvedPublic

Description

Title::nameOf can be used to retrieve the prefixed DB key associated with a page ID. It currently has no known callers[1], and it accesses the global state (via wfGetDB), which should be discouraged.

Any reason it can't be deprecated and removed?

[1] https://codesearch.wmflabs.org/search/?q=nameOf%5C(&i=nope&files=&repos=

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Aklapper renamed this task from Title::nameOf is unused to Remove unused Title::nameOf in MediaWiki Core.May 31 2020, 8:10 AM

Why not? I'd say yeah, go for it

Change 621968 had a related patch set uploaded (by Southparkfan; owner: Southparkfan):
[mediawiki/core@master] Deprecate Title::nameOf()

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

Change 621968 merged by jenkins-bot:
[mediawiki/core@master] Deprecate Title::nameOf()

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