Page MenuHomePhabricator

Don't use internal FallbackTemplate inside code
Closed, ResolvedPublic

Description

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.
https://codesearch.wmflabs.org/search/?q=SkinFallbackTemplate&i=nope&files=&repos=

Event Timeline

Jdlrobson created this task.Jun 4 2020, 9:26 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJun 4 2020, 9:27 PM
Krinkle updated the task description. (Show Details)Jun 4 2020, 9:39 PM
Krinkle added a subscriber: Krinkle.EditedJun 4 2020, 9:41 PM

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

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

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

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

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

Jdlrobson updated the task description. (Show Details)
Jdlrobson updated the task description. (Show Details)
Florian closed this task as Resolved.Sun, Nov 22, 2:46 PM
Florian claimed this task.
Florian added a subscriber: Florian.

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