Page MenuHomePhabricator

Replace use of $wgCommandLineMode in GrowthExperiments
Closed, ResolvedPublic

Description

We're trying to deprecate $wgCommandLineMode, as it is mostly redundant to constants defined in entry points, and its mutable nature complicates debugging. This is one of the repositories currently using it.

In most cases checks for $wgCommandLineMode can be replaced with MW_ENTRY_POINT === 'cli', but some cases are trickier, particularly if your code writes to the variable rather than only reads from it.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Change 987190 had a related patch set uploaded (by Bartosz Dziewoński; author: Bartosz Dziewoński):

[mediawiki/extensions/GrowthExperiments@master] Replace $wgCommandLineMode checks with MW_ENTRY_POINT

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

Change 987190 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] Replace $wgCommandLineMode checks with MW_ENTRY_POINT

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