diff -u b/core/lib/Drupal/Core/Config/ExtensionInstallStorage.php b/core/lib/Drupal/Core/Config/ExtensionInstallStorage.php --- b/core/lib/Drupal/Core/Config/ExtensionInstallStorage.php +++ b/core/lib/Drupal/Core/Config/ExtensionInstallStorage.php @@ -32,7 +32,7 @@ * The directory to scan in each extension to scan for files. Defaults to * 'config'. */ - public function __construct(StorageInterface $config_storage, $directory = 'config/install') { + public function __construct(StorageInterface $config_storage, $directory = self::CONFIG_INSTALL_DIRECTORY) { $this->configStorage = $config_storage; $this->directory = $directory; } diff -u b/core/lib/Drupal/Core/Config/InstallStorage.php b/core/lib/Drupal/Core/Config/InstallStorage.php --- b/core/lib/Drupal/Core/Config/InstallStorage.php +++ b/core/lib/Drupal/Core/Config/InstallStorage.php @@ -23,6 +23,16 @@ class InstallStorage extends FileStorage { /** + * Extension sub-directory containing default configuration for installation. + */ + const CONFIG_INSTALL_DIRECTORY = 'config/install'; + + /** + * Extension sub-directory containing configuration schema. + */ + const CONFIG_SCHEMA_DIRECTORY = 'config/schema'; + + /** * Folder map indexed by configuration name. * * @var array @@ -43,7 +53,7 @@ * The directory to scan in each extension to scan for files. Defaults to * 'config'. */ - public function __construct($directory = 'config/install') { + public function __construct($directory = self::CONFIG_INSTALL_DIRECTORY) { $this->directory = $directory; } diff -u b/core/lib/Drupal/Core/Extension/UpdateModuleHandler.php b/core/lib/Drupal/Core/Extension/UpdateModuleHandler.php --- b/core/lib/Drupal/Core/Extension/UpdateModuleHandler.php +++ b/core/lib/Drupal/Core/Extension/UpdateModuleHandler.php @@ -9,6 +9,7 @@ use Drupal\Core\Config\ConfigException; use Drupal\Core\Config\FileStorage; +use Drupal\Core\Config\InstallStorage; /** * Deals with module enables and throws exception if hooks fired during updates. @@ -103,7 +104,7 @@ // The default configuration is not altered in any way, and since the module // is just being installed, none of its configuration can exist already, so // this is a plain copy operation from one storage to another. - $module_config_path = drupal_get_path('module', $module) . '/config/install'; + $module_config_path = drupal_get_path('module', $module) . '/'. InstallStorage::CONFIG_INSTALL_DIRECTORY; if (is_dir($module_config_path)) { $module_filestorage = new FileStorage($module_config_path); $config_storage = \Drupal::service('config.storage'); diff -u b/core/modules/config/lib/Drupal/config/Tests/ConfigInstallWebTest.php b/core/modules/config/lib/Drupal/config/Tests/ConfigInstallWebTest.php --- b/core/modules/config/lib/Drupal/config/Tests/ConfigInstallWebTest.php +++ b/core/modules/config/lib/Drupal/config/Tests/ConfigInstallWebTest.php @@ -7,6 +7,7 @@ namespace Drupal\config\Tests; +use Drupal\Core\Config\InstallStorage; use Drupal\simpletest\WebTestBase; use Drupal\Core\Config\FileStorage; @@ -122,7 +123,7 @@ // Verify that the original data matches. We have to read the module config // file directly, because the install profile default system.cron.yml // configuration file was used to create the active configuration. - $config_dir = drupal_get_path('module', 'system') . '/config/install'; + $config_dir = drupal_get_path('module', 'system') . '/'. InstallStorage::CONFIG_INSTALL_DIRECTORY; $this->assertTrue(is_dir($config_dir)); $source_storage = new FileStorage($config_dir); $data = $source_storage->read($config_name); diff -u b/core/modules/system/lib/Drupal/system/Tests/Module/ModuleTestBase.php b/core/modules/system/lib/Drupal/system/Tests/Module/ModuleTestBase.php --- b/core/modules/system/lib/Drupal/system/Tests/Module/ModuleTestBase.php +++ b/core/modules/system/lib/Drupal/system/Tests/Module/ModuleTestBase.php @@ -7,6 +7,7 @@ namespace Drupal\system\Tests\Module; +use Drupal\Core\Config\InstallStorage; use Drupal\Core\Database\Database; use Drupal\Core\Config\FileStorage; use Drupal\simpletest\WebTestBase; @@ -95,7 +96,7 @@ * TRUE if configuration has been installed, FALSE otherwise. */ function assertModuleConfig($module) { - $module_config_dir = drupal_get_path('module', $module) . '/config/install'; + $module_config_dir = drupal_get_path('module', $module) . '/'. InstallStorage::CONFIG_INSTALL_DIRECTORY; if (!is_dir($module_config_dir)) { return; } only in patch2: unchanged: --- a/core/lib/Drupal/Core/Config/ConfigManager.php +++ b/core/lib/Drupal/Core/Config/ConfigManager.php @@ -156,7 +156,7 @@ public function uninstall($type, $name) { foreach ($config_names as $config_name) { $this->configFactory->get($config_name)->delete(); } - $schema_dir = drupal_get_path($type, $name) . '/config/schema'; + $schema_dir = drupal_get_path($type, $name) . '/' . InstallStorage::CONFIG_SCHEMA_DIRECTORY; if (is_dir($schema_dir)) { // Refresh the schema cache if uninstalling an extension that provides // configuration schema. only in patch2: unchanged: --- a/core/modules/config/lib/Drupal/config/Tests/DefaultConfigTest.php +++ b/core/modules/config/lib/Drupal/config/Tests/DefaultConfigTest.php @@ -8,6 +8,7 @@ namespace Drupal\config\Tests; use Drupal\config_test\TestInstallStorage; +use Drupal\Core\Config\InstallStorage; use Drupal\Core\Config\Schema\Property; use Drupal\Core\Config\TypedConfigManager; use Drupal\Core\TypedData\Type\BooleanInterface; @@ -69,7 +70,7 @@ public function testDefaultConfig() { // every module, profile and theme. $typed_config = new TypedConfigManager( \Drupal::service('config.storage'), - new TestInstallStorage('config/schema'), + new TestInstallStorage(InstallStorage::CONFIG_SCHEMA_DIRECTORY), \Drupal::service('cache.config') );