Page MenuHomePhabricator

Flow uses $wgUser
Closed, ResolvedPublic

Description

03:11:06 FILE: /workspace/src/extensions/Flow/includes/Content/BoardContent.php
03:11:06 ----------------------------------------------------------------------
03:11:06 FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
03:11:06 ----------------------------------------------------------------------
03:11:06  170 | WARNING | Deprecated global $wgUser used
03:11:06      |         | (MediaWiki.Usage.DeprecatedGlobalVariables.Deprecated$wgUser)
03:11:06 ----------------------------------------------------------------------
03:11:06 
03:11:06 
03:11:06 FILE: /workspace/src/extensions/Flow/includes/TalkpageManager.php
03:11:06 ----------------------------------------------------------------------
03:11:06 FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
03:11:06 ----------------------------------------------------------------------
03:11:06  158 | WARNING | Deprecated global $wgUser used
03:11:06      |         | (MediaWiki.Usage.DeprecatedGlobalVariables.Deprecated$wgUser)
03:11:06 ----------------------------------------------------------------------
03:11:06 
03:11:06 
03:11:06 FILE: /workspace/src/extensions/Flow/includes/TemplateHelper.php
03:11:06 ----------------------------------------------------------------------
03:11:06 FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
03:11:06 ----------------------------------------------------------------------
03:11:06  228 | WARNING | Deprecated global $wgUser used
03:11:06      |         | (MediaWiki.Usage.DeprecatedGlobalVariables.Deprecated$wgUser)
03:11:06 ----------------------------------------------------------------------

Similar to T262110: ForeignWikiRequest uses $wgUser (causes test failure), part of T159299: Deprecate and remove $wgUser

Blocking unrelated patches...

Codesearch: https://codesearch.wmcloud.org/deployed/?q=wgUser(%5B%3B%2C%27%22-%5D%7C%5Cs%7C%24)&i=nope&files=%5C.php%24&repos=mediawiki/extensions/Flow

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Reedy triaged this task as High priority.Sep 5 2020, 2:42 AM

Change 625041 had a related patch set uploaded (by Reedy; owner: Reedy):
[mediawiki/extensions/Flow@master] Ignore usage of $wgUser

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

Change 625041 merged by jenkins-bot:
[mediawiki/extensions/Flow@master] Ignore usage of $wgUser

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

Reedy raised the priority of this task from High to Needs Triage.Sep 5 2020, 3:42 AM

Removing high and ci-test-error as blocker mitigated using phpcs:ignore

Uses still need migrating away at a later date, so leaving task as a subtask of T245959: WMF deployed extensions need uses of global $wgUser removed [tracking] for tracking of that work

Change 626904 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/extensions/Flow@master] Replace $wgUser with RequestContext::getMain

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

Change 626904 merged by jenkins-bot:
[mediawiki/extensions/Flow@master] Replace $wgUser with RequestContext::getMain

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

DannyS712 claimed this task.