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).
This should be done in all of our extensions
- Wikibase
- Cognate
- WikibaseLexeme
- PropertySuggestor
- EntitySchema
- WikibaseQualityConstraints
- ArticlePlaceholder
- Wikidata.org
- WikimediaBadges
- InterwikiSorting
Acceptance Criteria:
- Don't use deprecated Language methods (use replacement services with DI)