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 added a subscriber: TasneemLo.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptOct 14 2015, 3:50 AM

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!

TasneemLo set Security to None.
Restricted Application added a subscriber: StudiesWorld. · View Herald TranscriptDec 20 2015, 9:16 AM

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

Umherirrender closed this task as Resolved.Jul 11 2017, 8:38 PM
Umherirrender triaged this task as Normal priority.