Configuration variables should never be accessed as global variables. Ideally, configuration is injected, individually or via a ServiceOptions instance or as a Config object. Where injection is not currently possible, configuration needs to be accessed via the main Config object obtained from the global service container: MediaWikiServices::getInstance()->getMainConfig()->get( 'SomeOption' ).
Status: Thomas' patch addressed many places where global variables were used to access configuration variables, but there are still quite a few left. Most of the remaining cases either write to the global variable, or the code is executed in a phpunit data provider, which causes any access to the MediawikiServices singleton to trigger warnings.