diff --git a/core/core.services.yml b/core/core.services.yml index 05b1e3e..3b2fbac 100644 --- a/core/core.services.yml +++ b/core/core.services.yml @@ -116,7 +116,7 @@ services: class: Drupal\Core\Config\InstallStorage config.typed: class: Drupal\Core\Config\TypedConfigManager - arguments: ['@config.storage', '@config.storage.schema', '@cache.discovery'] + arguments: ['@config.storage', '@config.storage.schema', '@cache.discovery', '@module_handler'] tags: - { name: plugin_manager_cache_clear } context.handler: diff --git a/core/lib/Drupal/Core/Config/TypedConfigManager.php b/core/lib/Drupal/Core/Config/TypedConfigManager.php index b520dd8..c025a20 100644 --- a/core/lib/Drupal/Core/Config/TypedConfigManager.php +++ b/core/lib/Drupal/Core/Config/TypedConfigManager.php @@ -10,7 +10,7 @@ use Drupal\Component\Utility\NestedArray; use Drupal\Core\Cache\CacheBackendInterface; use Drupal\Core\Config\Schema\ConfigSchemaDiscovery; -use Drupal\Core\Plugin\Discovery\AlterDecorator; +use Drupal\Core\Extension\ModuleHandlerInterface; use Drupal\Core\TypedData\TypedDataManager; /** @@ -49,11 +49,13 @@ class TypedConfigManager extends TypedDataManager implements TypedConfigManagerI * @param \Drupal\Core\Cache\CacheBackendInterface $cache * The cache backend to use for caching the definitions. */ - public function __construct(StorageInterface $configStorage, StorageInterface $schemaStorage, CacheBackendInterface $cache) { + public function __construct(StorageInterface $configStorage, StorageInterface $schemaStorage, CacheBackendInterface $cache, ModuleHandlerInterface $module_handler) { $this->configStorage = $configStorage; $this->schemaStorage = $schemaStorage; $this->setCacheBackend($cache, 'typed_config_definitions'); - $this->discovery = new AlterDecorator(new ConfigSchemaDiscovery($schemaStorage), 'config_schema_info'); + $this->discovery = new ConfigSchemaDiscovery($schemaStorage); + $this->alterInfo('config_schema_info'); + $this->moduleHandler = $module_handler; } /** diff --git a/core/modules/locale/locale.services.yml b/core/modules/locale/locale.services.yml index f7794c3..64a9a0b 100644 --- a/core/modules/locale/locale.services.yml +++ b/core/modules/locale/locale.services.yml @@ -1,7 +1,7 @@ services: locale.config.typed: class: Drupal\locale\LocaleConfigManager - arguments: ['@config.storage', '@config.storage.schema', '@config.storage.installer', '@locale.storage', '@cache.discovery', '@config.factory', '@language_manager'] + arguments: ['@config.storage', '@config.storage.schema', '@config.storage.installer', '@locale.storage', '@cache.discovery', '@config.factory', '@language_manager', '@module_handler'] locale.storage: class: Drupal\locale\StringDatabaseStorage arguments: ['@database'] diff --git a/core/modules/locale/src/LocaleConfigManager.php b/core/modules/locale/src/LocaleConfigManager.php index 5466558..5b7fb99 100644 --- a/core/modules/locale/src/LocaleConfigManager.php +++ b/core/modules/locale/src/LocaleConfigManager.php @@ -11,6 +11,7 @@ use Drupal\Core\Config\TypedConfigManager; use Drupal\Core\Config\StorageInterface; use Drupal\Core\Config\ConfigFactoryInterface; +use Drupal\Core\Extension\ModuleHandlerInterface; use Drupal\Core\Language\LanguageInterface; use Drupal\language\ConfigurableLanguageManagerInterface; @@ -71,9 +72,9 @@ class LocaleConfigManager extends TypedConfigManager { * @param \Drupal\language\ConfigurableLanguageManagerInterface * The language manager. */ - public function __construct(StorageInterface $configStorage, StorageInterface $schemaStorage, StorageInterface $installStorage, StringStorageInterface $localeStorage, CacheBackendInterface $cache, ConfigFactoryInterface $config_factory, ConfigurableLanguageManagerInterface $language_manager) { + public function __construct(StorageInterface $configStorage, StorageInterface $schemaStorage, StorageInterface $installStorage, StringStorageInterface $localeStorage, CacheBackendInterface $cache, ConfigFactoryInterface $config_factory, ConfigurableLanguageManagerInterface $language_manager, ModuleHandlerInterface $module_handler) { // Note we use the install storage for the parent constructor. - parent::__construct($configStorage, $schemaStorage, $cache); + parent::__construct($configStorage, $schemaStorage, $cache, $module_handler); $this->installStorage = $installStorage; $this->localeStorage = $localeStorage; $this->configFactory = $config_factory;