See parent task. This is a bug against core, bugs for extensions, if needed, should be subtasks of this one.
|Open||None||T11968 Reduce use of global and public variables|
|Open||None||T159283 Deprecate non-configuration globals|
|Open||None||T160814 Deprecate $wgLang|
|Open||None||T160806 Remove and replace $wgLang in extensions under the social tools umbrella|
One of the more prominent uses in core comes from ContentHandler, seen in most page views when enabling verbose logging:
[wfDebug] [DEBUG] Unstubbing $wgLang on call of $wgLang::unstub from ContentHandler->getPageLanguage