we have a chicken-and-egg problem with the configuration system - we want to make the backend used to persist data configurable, but we can't store that in the config system itself.

this is problem is not unique to the config system. right now, we just use settings.php, which shoves stuff into global $conf, which variable_get() will honour.

we should do something better. we should provide a non-configurable, config-like object that provides access to any configuration in settings.php, without having to rely on global $conf.

this object can also be used to replace the ugly use of global $conf over in #1484690: Implement $conf overrides in the configuration system.

right now, my thought is to provide a bootstrap_config() factory which provides calling code with the same interface as config() - it returns an object with a collection of values from settings.php.

Comments

Anonymous’s picture

Status: Active » Closed (duplicate)

i think settings_get() is now the way we handle early-phase data what we can't store in config, so i guess this is now redundant.

Anonymous’s picture