Skip to content

Instantly share code, notes, and snippets.

@sun
Last active August 29, 2015 13:59
Show Gist options
  • Save sun/10732324 to your computer and use it in GitHub Desktop.
Save sun/10732324 to your computer and use it in GitHub Desktop.
D8 config in files for development
diff --git a/sites/default/settings.php b/sites/default/settings.php
index b2ce930..9d0514e 100644
--- a/sites/default/settings.php
+++ b/sites/default/settings.php
@@ -611,7 +611,8 @@
* The 'bootstrap_config_storage' setting needs to be a callable that returns
* core.services.yml.
*/
- # $settings['bootstrap_config_storage'] = array('Drupal\Core\Config\BootstrapConfigStorageFactory', 'getFileStorage');
+$settings['bootstrap_config_storage'] = 'Drupal\Core\Config\BootstrapConfigStorageFactory::getFileStorage';
+$GLOBALS['conf']['container_yamls'][] = $conf_path . '/services.yml';
/**
* Configuration overrides.
diff --git a/sites/default/services.yml b/sites/default/services.yml
new file mode 100644
index 0000000..3d2a0cd
--- /dev/null
+++ b/sites/default/services.yml
@@ -0,0 +1,6 @@
+services:
+ config.storage:
+ class: Drupal\Core\Config\CachedStorage
+ arguments: ['@config.storage.active', '@cache.config']
+ config.storage.active:
+ alias: config.storage.file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment