Page MenuHomePhabricator

Remove different modes from LanguageFallbackChainFactory
Closed, ResolvedPublic

Description

LanguageFallbackChainFactory can create fallback chains from languages in several modes (FALLBACK_SELF, FALLBACK_VARIANTS, and FALLBACK_OTHERS), but no caller uses this ability – I think the last uses were removed in 2016 (Use FALLBACK_ALL for all data access functionality, T76218). Since this complicates the code, and we now need to touch it for the mul language code (does that count as FALLBACK_OTHERS or should it be a new mode?), let’s get rid of this ability.

Event Timeline

Change 755730 had a related patch set uploaded (by Lucas Werkmeister (WMDE); author: Lucas Werkmeister (WMDE)):

[mediawiki/extensions/Wikibase@master] Remove custom mode from LanguageFallbackLabelDescriptionLookupFactory

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

Change 755732 had a related patch set uploaded (by Lucas Werkmeister (WMDE); author: Lucas Werkmeister (WMDE)):

[mediawiki/extensions/Wikibase@master] Remove LanguageFallbackChainFactory default mode arguments

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

Change 755733 had a related patch set uploaded (by Lucas Werkmeister (WMDE); author: Lucas Werkmeister (WMDE)):

[mediawiki/extensions/Wikibase@master] Remove custom mode from EntityAccessorTest

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

Hm, I just noticed the way the mode is used in buildFromBabel()… I think the changes I uploaded so far (above) are still nice cleanups, but I’m not sure if this task can be completed as I originally imagined it.

Change 755953 had a related patch set uploaded (by Lucas Werkmeister (WMDE); author: Lucas Werkmeister (WMDE)):

[mediawiki/extensions/Wikibase@master] Fix type comments in LanguageFallbackChainFactory

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

Change 756008 had a related patch set uploaded (by Lucas Werkmeister (WMDE); author: Lucas Werkmeister (WMDE)):

[mediawiki/extensions/Wikibase@master] Don\u2019t use custom fallback mode in TermLanguageFallbackChainTest

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

Change 756015 had a related patch set uploaded (by Lucas Werkmeister (WMDE); author: Lucas Werkmeister (WMDE)):

[mediawiki/extensions/Wikibase@master] Remove mode arguments from LanguageFallbackChainFactory

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

Change 756032 had a related patch set uploaded (by Lucas Werkmeister (WMDE); author: Lucas Werkmeister (WMDE)):

[mediawiki/extensions/Wikibase@master] Simplify LanguageFallbackChainFactory implementation

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

Change 755730 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] Remove custom mode from LanguageFallbackLabelDescriptionLookupFactory

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

Change 755732 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] Remove LanguageFallbackChainFactory default mode arguments

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

Change 755733 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] Remove custom mode from EntityAccessorTest

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

Change 755953 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] Fix type comments in LanguageFallbackChainFactory

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

Change 756008 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] Don\u2019t use custom fallback mode in TermLanguageFallbackChainTest

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

Change 756015 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] Remove mode arguments from LanguageFallbackChainFactory

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

Change 756032 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] Simplify LanguageFallbackChainFactory implementation

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