Page MenuHomePhabricator

Using context variable when usable instead of globals
Closed, ResolvedPublic

Description

As mentioned in T89682

Using globals ($wgUser, $wgRequest) when their context equivalents could be used instead ($this->getUser(), $this->getRequest()) should give an error and fixit

Event Timeline

TasneemLo raised the priority of this task from to Needs Triage.
TasneemLo updated the task description. (Show Details)
TasneemLo subscribed.

Hi @TasneemLo. Please associate at least one project with this task, otherwise one cannot find this task when searching in the corresponding project(s). Is this about MediaWiki-Codesniffer? Thanks!

Happen by the MediaWiki.Usage.ExtendClassUsage.FunctionVarUsage sniff - https://gerrit.wikimedia.org/r/#/c/301335/

Umherirrender triaged this task as Medium priority.