Change record status: 
Project: 
Introduced in branch: 
8.x
Introduced in version: 
8.0
Description: 

Since the configuration context system was removed in #2098119: Replace config context system with baked-in locale support and single-event based overrides, the configuration API provided ConfigFactory::enableOverrides() and ConfigFactory::disableOverrides(). This caused side effects, since code written needed to assume the prior state of the overrides and could not look up and set back the state to the prior value. Therefore these methods were replaced with getters and setters similar to the configuration language API. Now use ConfigFactory::getOverrideState() and ConfigFactory::setOverrideState() to retrieve old state and set new state.

$old_state = $config_factory->getOverrideState();
$config_factory->setOverrideState(FALSE);

// ...
// ... Now access configuration without overrides ...
// ...

// Set back to the old state so this code has no global side effects.
$config_factory->setOverrideState($old_state);

The same pattern applies to getLanguage() and setLanguage() on ConfigFactory.

Impacts: 
Module developers