Page MenuHomePhabricator

Don't use internal FallbackTemplate inside code
Closed, ResolvedPublic


FallbackTemplate is being removed from core in 1.35. It was not intended for use outside core so will not follow the deprecation process but currently is used by unit tests for the Wikibase and the CookieWarning extensions.

Event Timeline

They were likely picked because BaseTemplate is abstract so SkinFallbackTemplate was the only somewhat neutral non-abstract implementation in core to pick.

  • Wikibase test: Straight-forward to replace by direct use of BaseTemplate with createMock().
  • CookieWarning: Needs a real instance, e.g. via getMockBuilder and stub execute().

Change 602772 had a related patch set uploaded (by Jdlrobson; owner: Jdlrobson):
[mediawiki/extensions/Wikibase@master] Don't use FallbackTemplate inside tests

CookieWarning is not deployed anywhere on Wikimedia from what I can see so I don't think that should block the core change.

Jdlrobson triaged this task as Medium priority.Jun 5 2020, 9:54 PM

Change 602772 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Don't use FallbackTemplate inside tests

Jdlrobson lowered the priority of this task from Medium to Low.Jun 5 2020, 11:11 PM
Jdlrobson removed a project: Wikidata.
Jdlrobson added a subscriber: Addshore.

Thanks @Addshore

Florian claimed this task.
Florian subscribed.

CookieWarning doesn't use FallbackTemplate from what I can see.