Skip to content
Snippets Groups Projects

Issue #3023903: Allow config override directory to be stored outside of Drupal.

2 files
+ 10
5
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -7,6 +7,7 @@ use Drupal\Core\Cache\CacheBackendInterface;
use Drupal\Core\Config\ConfigFactoryOverrideInterface;
use Drupal\Core\Config\FileStorage;
use Drupal\Core\Config\StorageInterface;
use Drupal\Core\Site\Settings;
/**
* Site configuration overrides service.
@@ -50,9 +51,9 @@ class SiteConfigOverrides implements ConfigFactoryOverrideInterface {
*/
public function loadOverrides($names) {
$overrides = [];
$directory;
$directory = $this->getSiteConfigOverrideFolder();
if (!$directory = $this->getSiteConfigOverrideFolder()) {
if (!file_exists($directory)) {
return $overrides;
}
@@ -76,7 +77,7 @@ class SiteConfigOverrides implements ConfigFactoryOverrideInterface {
*/
protected function getSiteConfigOverrideFolder() {
try {
return $this->root . '/' . $this->configGetConfigDirectory(static::CONFIG_OVERRIDE_DIRECTORY);
return Settings::get(static::CONFIG_OVERRIDE_DIRECTORY, $this->root . '/' . $this->configGetConfigDirectory(static::CONFIG_OVERRIDE_DIRECTORY));
}
catch (\Exception $e) {
return NULL;
Loading