Page MenuHomePhabricator

Remove LinkCache::addGoodLinkObj()
Closed, ResolvedPublic


LinkCache::addGoodLinkObj() has many optional arguments, but omitting them actually means corrupting the cache. Production code should never call this method, it should use addGoodLinkObjFromRow instead.

addGoodLinkObj() is kind of handy to have for tests. We should introduce a separate method, addGoodLinkObjForTest(), that can only be used of MW_PHPUNIT_TEST is set.

addGoodLinkObj() is used in six extensions, see


  • CirrusSearch
  • Babel
  • Flow
  • GeoData
  • Wikibase


  • Favorites (beta)

Event Timeline

Change 699071 had a related patch set uploaded (by Daniel Kinzler; author: Daniel Kinzler):

[mediawiki/core@master] LinkCache: hard deprecate addGoodLinkObj()

Change 699071 merged by jenkins-bot:

[mediawiki/core@master] LinkCache: soft deprecate addGoodLinkObj()

Change 734657 had a related patch set uploaded (by Vlad.shapik; author: Vlad.shapik):

[mediawiki/core@master] Hard deprecate LinkCache::addGoodLinkObj

I believe a patch to hard-deprecate this method can be submitted now, and we're done.

The patch has already landed ->

Change 734657 merged by jenkins-bot:

[mediawiki/core@master] Hard deprecate LinkCache::addGoodLinkObj