Page MenuHomePhabricator

Remove calls to deprecated WikibaseRepo::getUserLanguage
Open, LowPublic

Description

Even though the UserLanguage service has been migrated to the new service container, it was decided in T278819 that this service should be deprecated and gradually retired out of usage, because services in the service container should be independent of a specific request context, including the user language for that request, and $wgUser will be deprecated eventually (T159299).

The method was deprecated in https://gerrit.wikimedia.org/r/c/mediawiki/extensions/Wikibase/+/676422

Currently, this method is called in the following extensions:

  • Wikibase
  • WikibaseLexeme
  • WikibaseCirrusSearch
  • WikibaseLexemeCirrusSearch
  • WikibaseQualityConstraints
  • WikibaseMediaInfo

Code search: https://codesearch.wmcloud.org/search/?q=WikibaseRepo%3A%3AgetUserLanguage&i=nope&files=&excludeFiles=&repos=

In each of these extensions, an alternative way to obtain the user language should be found to replace calls to this method, either by utilizing the RequestContext or otherwise (in places where the request is not available).

Acceptance criteria🏕️🌟:

  • WikibaseRepo::getUserLanguage is no longer called from extensions that we own

Related Objects

StatusSubtypeAssignedTask
OpenNone
ResolvedItamarWMDE
ResolvedItamarWMDE
OpenNone
OpenNone
OpenNone
ResolvedLucas_Werkmeister_WMDE
ResolvedLucas_Werkmeister_WMDE
OpenNone
OpenNone
OpenNone
OpenNone
OpenNone
OpenNone
OpenNone

Event Timeline

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

[mediawiki/extensions/WikibaseQualityConstraints@master] Don’t inject user language in CheckConstraintParameters

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

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

[mediawiki/extensions/WikibaseQualityConstraints@master] Don’t inject user language in CheckConstraints

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

Change 677277 merged by jenkins-bot:

[mediawiki/extensions/WikibaseQualityConstraints@master] Don’t inject user language in CheckConstraintParameters

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

Change 677278 merged by jenkins-bot:

[mediawiki/extensions/WikibaseQualityConstraints@master] Don’t inject user language in CheckConstraints

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

Addshore updated the task description. (Show Details)