Page MenuHomePhabricator

Deprecate and remove `global $mediaWiki`
Closed, ResolvedPublic

Description

Usages can be replaced with service calls.

  • Remove usages. These seem to be the only usages:
    • extension-BlueSpiceFlaggedRevsConnector
    • extension-FlaggedRevs
    • extension-PageDisqus
    • skin-Poncho
  • PHPCodeSniffer should complain if the global is reintroduced.
  • Finally, the global declaration in mediawiki-core index.php should be removed.

Event Timeline

Change 735729 had a related patch set uploaded (by Awight; author: Awight):

[mediawiki/extensions/FlaggedRevs@master] Remove global $mediaWiki usage

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

Change 735731 had a related patch set uploaded (by Awight; author: Awight):

[mediawiki/extensions/BlueSpiceFlaggedRevsConnector@master] Refactor usage of global $mediaWiki

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

Change 735732 had a related patch set uploaded (by Awight; author: Awight):

[mediawiki/extensions/PageDisqus@master] Refactor usage of global $mediaWiki

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

Change 735733 had a related patch set uploaded (by Awight; author: Awight):

[mediawiki/skins/Poncho@master] Refactor usage of global $mediaWiki

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

Change 735734 had a related patch set uploaded (by Awight; author: Awight):

[mediawiki/tools/codesniffer@master] Disallow global $mediaWiki

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

Change 735735 had a related patch set uploaded (by Awight; author: Awight):

[mediawiki/core@master] [DNM] Remove declaration of global $mediaWiki

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

Change 735733 merged by jenkins-bot:

[mediawiki/skins/Poncho@master] Refactor usage of global $mediaWiki

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

Change 735732 merged by jenkins-bot:

[mediawiki/extensions/PageDisqus@master] Refactor usage of global $mediaWiki

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

Change 735734 abandoned by Awight:

[mediawiki/tools/codesniffer@master] Disallow global $mediaWiki

Reason:

Thanks, yes this was a mistake and seems unrelated. The rule for globals is already just "$wg"-, and usages of $mediaWiki should have required a special exemption already (though they did not set off phpcs alerts in some repos, for unknown reasons).

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

Change 736049 had a related patch set uploaded (by Pwirth; author: Awight):

[mediawiki/extensions/BlueSpiceFlaggedRevsConnector@REL1_35] Refactor usage of global $mediaWiki

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

Change 736050 had a related patch set uploaded (by Pwirth; author: Awight):

[mediawiki/extensions/BlueSpiceFlaggedRevsConnector@REL1_35-4.0.x] Refactor usage of global $mediaWiki

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

Change 736050 merged by Pwirth:

[mediawiki/extensions/BlueSpiceFlaggedRevsConnector@REL1_35-4.0.x] Refactor usage of global $mediaWiki

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

Change 735731 merged by Pwirth:

[mediawiki/extensions/BlueSpiceFlaggedRevsConnector@master] Refactor usage of global $mediaWiki

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

Change 736049 merged by jenkins-bot:

[mediawiki/extensions/BlueSpiceFlaggedRevsConnector@REL1_35] Refactor usage of global $mediaWiki

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

Change 735729 merged by jenkins-bot:

[mediawiki/extensions/FlaggedRevs@master] Remove global $mediaWiki usage

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

Change 735735 merged by jenkins-bot:

[mediawiki/core@master] index.php: Remove global $mediaWiki variable

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

Jdforrester-WMF updated the task description. (Show Details)