Page MenuHomePhabricator

Decrease public variables in Language class
Closed, ResolvedPublic



class Language contains a lot of public and unused members. A few of them:

  • public $mVariants - isn't even assigned
  • public $mLoaded - isn't even assigned
  • public $mMagicExtensions = []; - assigned and even has redundant logic:

  • private $mParentLanguage = false; - isn't used
  • public $transformData = [];


This introduces difficulties in supporting further versions.

Expected result:

  • Unused variables should be removed.
  • Variables that isn't used from outside should be protected/private
  • changed variables should be deprecated.


Related Gerrit Patches:
mediawiki/core : masterReduce usage of the Language class

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJan 29 2020, 3:51 PM

Looks good to me. Maybe @Nikerabbit wants to have a look.

Change 570606 had a related patch set uploaded (by Art-Baltai; owner: Art-Baltai):
[mediawiki/core@master] component: Strip \Language

Change 570606 merged by jenkins-bot:
[mediawiki/core@master] Reduce usage of the Language class

daniel closed this task as Resolved.Fri, Mar 27, 10:42 AM