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.

Event Timeline

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