Page MenuHomePhabricator

Stop using deprecated Language static methods in Wikibase
Open, Needs TriagePublic

Description

Most of Language’s static methods (::factory, ::fetchLanguageName, etc.) were deprecated in MediaWiki 1.34 or 1.35. We should stop using them, and migrate to their replacement services (LanguageFactory, LanguageNameUtils, etc.), ideally with proper dependency injection.

I could put a list of affected methods here, but I think the few non-deprecated public static methods that Language still has are probably not used by Wikibase anyways, so it seems simpler to codesearch Language:: and work through that whole list (except Language::class).

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptAug 13 2020, 10:01 AM

Change 621010 had a related patch set uploaded (by Lucas Werkmeister (WMDE); owner: Lucas Werkmeister (WMDE)):
[mediawiki/extensions/Wikibase@master] Inject LanguageNameUtils into MetaContentLanguages

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

Change 621010 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Inject LanguageNameUtils into MetaContentLanguages

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