Page MenuHomePhabricator

Hard-deprecate and remove $wgContLang
Open, MediumPublic

Description

$wgContLang was deprecated in 1.32. It can easily be replaced with services, and MW-codesniffer already has a sniff to discourage usage. We should hard-deprecate and remove it.

Event Timeline

Daimona created this task.Feb 23 2020, 11:25 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptFeb 23 2020, 11:26 AM

Change 574226 had a related patch set uploaded (by Daimona Eaytoy; owner: Daimona Eaytoy):
[mediawiki/extensions/SpellingApi@master] Stop using deprecated $wgContLang

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

Change 566460 had a related patch set uploaded (by Daimona Eaytoy; owner: Addshore):
[mediawiki/extensions/Wikibase@master] Stop using wgContLang in Client and Repo service factories

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

Change 574228 had a related patch set uploaded (by Daimona Eaytoy; owner: Daimona Eaytoy):
[mediawiki/core@master] Avoid using deprecated $wgContLang

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

Change 574229 had a related patch set uploaded (by Daimona Eaytoy; owner: Daimona Eaytoy):
[mediawiki/extensions/Cargo@master] Don't use $wgContLang on MW 1.32+

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

Change 566460 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Stop using wgContLang in Client and Repo service factories

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

Change 574228 merged by jenkins-bot:
[mediawiki/core@master] Avoid using deprecated $wgContLang

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

Change 574226 merged by jenkins-bot:
[mediawiki/extensions/SpellingApi@master] Stop using deprecated $wgContLang

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

Change 574229 merged by jenkins-bot:
[mediawiki/extensions/Cargo@master] Don't use $wgContLang on MW 1.32+

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

Change 579618 had a related patch set uploaded (by QEDK; owner: QEDK):
[mediawiki/extensions/GlobalContribs@master] Bump MW version, remove deprecated $wgContLang() and IP class

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

Change 579919 had a related patch set uploaded (by QEDK; owner: QEDK):
[mediawiki/extensions/DynamicPageList@master] Remove $wgContLang and $wgParser uses

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

Change 579618 merged by GeorgeBarnick:
[mediawiki/extensions/GlobalContribs@master] Bump MW version, remove deprecated $wgContLang() and IP class

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

Change 579919 merged by jenkins-bot:
[mediawiki/extensions/DynamicPageList@master] Remove $wgContLang and $wgParser uses

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

Change 581544 had a related patch set uploaded (by QEDK; owner: QEDK):
[mediawiki/extensions/EditNotify@master] Bump MW version, remove $wgParser and $wgContLang variables

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

Change 581544 merged by jenkins-bot:
[mediawiki/extensions/EditNotify@master] Bump MW version, remove $wgParser and $wgContLang variables

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

Change 586080 had a related patch set uploaded (by QEDK; owner: QEDK):
[mediawiki/extensions/NamespacePopups@master] Bump MW version, remove deprecated $wgContLang, update .gitignore

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

Change 586080 merged by jenkins-bot:
[mediawiki/extensions/NamespacePopups@master] Bump MW version, remove deprecated $wgContLang, update .gitignore

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

Change 588078 had a related patch set uploaded (by QEDK; owner: QEDK):
[mediawiki/extensions/News@master] Remove deprecated $wgContLang, $wgParser

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

Change 588078 merged by jenkins-bot:
[mediawiki/extensions/News@master] Remove deprecated $wgContLang, $wgParser

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

Krinkle triaged this task as Medium priority.Apr 21 2020, 3:54 PM
Krinkle added a subscriber: Krinkle.

It looks like all use has been removed in wmf production. What's left are assignments (not read-outs) for compatibility with the code that no longer exists. (Codesearch)

Looks ripe for removal!

Change 595205 had a related patch set uploaded (by Jforrester; owner: Jforrester):
[mediawiki/core@master] Drop wgContLang, deprecated in 1.32

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

It looks like all use has been removed in wmf production. What's left are assignments (not read-outs) for compatibility with the code that no longer exists. (Codesearch)

Looks like two uses have emerged recently and/or previously missed:

  • CirrusSearch: $config->{get,set,has}( 'ContLang' ) (prod and test)
  • MobileFrontend: $config->get( 'ContLang' ) (prod)

Change 596252 had a related patch set uploaded (by Jforrester; owner: Jforrester):
[mediawiki/extensions/MobileFrontend@master] Stop using deprecated wgContLang, about to be removed

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

Change 596254 had a related patch set uploaded (by Jforrester; owner: Jforrester):
[mediawiki/extensions/CirrusSearch@master] Stop trying to write to deprecated global wgContLang, we're removing it

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

Change 596252 merged by jenkins-bot:
[mediawiki/extensions/MobileFrontend@master] Stop using deprecated wgContLang, about to be removed

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

Change 596254 abandoned by Jforrester:
Stop trying to write to deprecated global wgContLang, we're removing it

Reason:
Sorry, yes, SiteConfiguration not SiteMatrix; but good to know that despite appearances this isn't related.

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