Page MenuHomePhabricator

Using context variable when usable instead of globals
Closed, ResolvedPublic


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 added a subscriber: TasneemLo.

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 -

Umherirrender triaged this task as Medium priority.