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 @@ -51,7 +51,7 @@ */ protected function getAllFolders() { if (!isset($this->folders)) { - $this->folders = array(); + $this->folders = $this->getCoreComponents(); $modules = $this->configStorage->read('system.module'); if (isset($modules['enabled'])) { $this->folders += $this->getComponentNames('module', array_keys($modules['enabled'])); 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 @@ -129,7 +129,8 @@ */ protected function getAllFolders() { if (!isset($this->folders)) { - $this->folders = $this->getComponentNames('profile', array(drupal_get_profile())); + $this->folders = $this->getCoreComponents(); + $this->folders += $this->getComponentNames('profile', array(drupal_get_profile())); $this->folders += $this->getComponentNames('module', array_keys(drupal_system_listing('/^' . DRUPAL_PHP_FUNCTION_PATTERN . '\.module$/', 'modules', 'name', 0))); $this->folders += $this->getComponentNames('theme', array_keys(drupal_system_listing('/^' . DRUPAL_PHP_FUNCTION_PATTERN . '\.info.yml$/', 'themes'))); } @@ -137,6 +138,24 @@ } /** + * Gets all configuration supplied by core. + * + * @return array + * Array containing items indexed by name with a value of the core directory + * that supplies it. + */ + protected function getCoreComponents() { + $extension = '.' . $this->getFileExtension(); + $folders = array(); + $directory = DRUPAL_ROOT . '/core/' . $this->folderToScan; + $files = new \GlobIterator($directory . '/*' . $extension); + foreach ($files as $file) { + $folders[$file->getBasename($extension)] = $directory; + } + return $folders; + } + + /** * Get all configuration names and folders for a list of modules or themes. * * @param string $type diff -u b/core/lib/Drupal/Core/Config/TypedConfigManager.php b/core/lib/Drupal/Core/Config/TypedConfigManager.php --- b/core/lib/Drupal/Core/Config/TypedConfigManager.php +++ b/core/lib/Drupal/Core/Config/TypedConfigManager.php @@ -12,7 +12,6 @@ use Drupal\Component\Utility\NestedArray; use Drupal\Component\Utility\String; use Drupal\Core\Cache\CacheBackendInterface; -use Symfony\Component\Yaml\Yaml; /** * Manages config type plugins. @@ -183,10 +182,6 @@ $this->definitions = $cache->data; } else { - // Load the base data types for configuration schema. - $yaml = new Yaml(); - $this->definitions = $yaml->parse(DRUPAL_ROOT . '/core/lib/Drupal/Core/Config/Schema/core.data_types.schema.yml'); - // Load configuration schema supplied by enabled extensions. foreach ($this->schemaStorage->readMultiple($this->schemaStorage->listAll()) as $schema) { foreach ($schema as $type => $definition) { $this->definitions[$type] = $definition; only in patch2: unchanged: --- a/core/modules/locale/lib/Drupal/locale/Tests/LocaleConfigManagerTest.php +++ b/core/modules/locale/lib/Drupal/locale/Tests/LocaleConfigManagerTest.php @@ -22,7 +22,7 @@ class LocaleConfigManagerTest extends DrupalUnitTestBase { * * @var array */ - public static $modules = array('locale', 'locale_test'); + public static $modules = array('language', 'locale', 'locale_test'); /** * {@inheritdoc} @@ -39,27 +39,11 @@ public static function getInfo() { * Tests hasTranslation(). */ public function testHasTranslation() { - $locale_config_manager = new LocaleConfigManager( - // In contrast to the actual configuration we use the installer storage - // as the config storage. That way, we do not actually have to install - // the module and can extend DrupalUnitTestBase. - $this->container->get('config.storage.installer'), - $this->container->get('config.storage.schema'), - $this->container->get('config.storage.installer'), - $this->container->get('locale.storage'), - $this->container->get('cache.config'), - $this->container->get('config.factory') - ); - + $this->installConfig(array('locale_test')); + $locale_config_manager = \Drupal::Service('locale.config.typed'); $language = new Language(array('id' => 'de')); - // The installer storage throws an expcetion when requesting a non-existing - // file. - try { - $locale_config_manager->hasTranslation('locale_test.no_translation', $language); - } - catch (StorageException $exception) { - $result = FALSE; - } + + $result = $locale_config_manager->hasTranslation('locale_test.no_translation', $language); $this->assertIdentical(FALSE, $result); $result = $locale_config_manager->hasTranslation('locale_test.translation', $language);