We use globals a lot inside MobileFrontend.hooks.php but sometimes we use the global keyword and sometimes we use getMFConfig. We want to encourage use of ConfigRegistry via getMFConfig and discourage use of globals.
= Acceptance criteria
[] phpcs should complain when global keyword is used in our PHP codebase using [[ https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Squiz/Sniffs/PHP/GlobalKeywordSniff.php | GlobalKeywordSniff ]]. It should be enabled with low severity.
[] Where we need to access globals add an inline comment documenting why and disable the phpcs sniff using // @codingStandardsIgnoreLine
[] If inappropriate usages of globals are found e.g. https://phabricator.wikimedia.org/T146312#3188363 document them so whoever signs off the ticket can create a follow up card
Examples:
* https://github.com/wikimedia/mediawiki-extensions-MobileFrontend/blob/master/includes/MobileFrontend.hooks.php#L709
* https://github.com/wikimedia/mediawiki-extensions-MobileFrontend/blob/master/includes/MobileFrontend.hooks.php#L717
= Sign off checklist
[] If any globals need fixing, please create a follow up task.
Timebox: 4hrs