diff --git a/core/core.services.yml b/core/core.services.yml index 210766f..1fa3efb 100644 --- a/core/core.services.yml +++ b/core/core.services.yml @@ -80,7 +80,9 @@ services: arguments: ['@config.storage', '@event_dispatcher', '@config.typed'] config.installer: class: Drupal\Core\Config\ConfigInstaller - arguments: ['@config.factory', '@config.storage', '@config.typed', '@config.manager', '@event_dispatcher'] + arguments: ['@config.factory', '@config.storage', '@config.typed', '@event_dispatcher'] + calls: + - [setConfigManager, ['@config.manager']] config.storage.staging: class: Drupal\Core\Config\FileStorage factory_class: Drupal\Core\Config\FileStorageFactory @@ -184,7 +186,9 @@ services: - [setThemeNegotiator, ['@?theme.negotiator']] theme_handler: class: Drupal\Core\Extension\ThemeHandler - arguments: ['@config.factory', '@module_handler', '@cache.cache', '@info_parser', '@config.installer', '@router.builder'] + arguments: ['@config.factory', '@module_handler', '@cache.cache', '@info_parser', '@router.builder'] + calls: + - [setConfigInstaller, ['@config.installer']] entity.manager: class: Drupal\Core\Entity\EntityManager arguments: ['@container.namespaces', '@service_container', '@module_handler', '@cache.cache', '@language_manager', '@string_translation'] diff --git a/core/includes/theme.inc b/core/includes/theme.inc index 23e2a3a..435994f 100644 --- a/core/includes/theme.inc +++ b/core/includes/theme.inc @@ -101,7 +101,7 @@ function drupal_theme_initialize() { // Determine the active theme for the theme negotiator service. This includes // the default theme as well as really specific ones like the ajax base theme. $request = \Drupal::request(); - $theme = \Drupal::service('theme.negotiator')->determineActiveTheme($request) ?: 'stark'; + $theme = \Drupal::service('theme.negotiator')->getActiveTheme($request) ?: 'stark'; // Store the identifier for retrieving theme settings with. $theme_key = $theme; diff --git a/core/lib/Drupal/Core/Config/ConfigInstaller.php b/core/lib/Drupal/Core/Config/ConfigInstaller.php index 2bb06b3..f373787 100644 --- a/core/lib/Drupal/Core/Config/ConfigInstaller.php +++ b/core/lib/Drupal/Core/Config/ConfigInstaller.php @@ -56,20 +56,27 @@ class ConfigInstaller implements ConfigInstallerInterface { * The active configuration storage. * @param \Drupal\Core\Config\TypedConfigManagerInterface $typed_config * The typed configuration manager. - * @param \Drupal\Core\Config\ConfigManagerInterface $config_manager - * The configuration manager. * @param \Symfony\Component\EventDispatcher\EventDispatcherInterface $event_dispatcher * The event dispatcher. */ - public function __construct(ConfigFactoryInterface $config_factory, StorageInterface $active_storage, TypedConfigManagerInterface $typed_config, ConfigManagerInterface $config_manager, EventDispatcherInterface $event_dispatcher) { + public function __construct(ConfigFactoryInterface $config_factory, StorageInterface $active_storage, TypedConfigManagerInterface $typed_config, EventDispatcherInterface $event_dispatcher) { $this->configFactory = $config_factory; $this->activeStorage = $active_storage; $this->typedConfig = $typed_config; - $this->configManager = $config_manager; $this->eventDispatcher = $event_dispatcher; } /** + * Sets the config manager. + * + * @param \Drupal\Core\Config\ConfigManagerInterface $config_manager + * The configuration manager. + */ + public function setConfigManager(ConfigManagerInterface $config_manager) { + $this->configManager = $config_manager; + } + + /** * {@inheritdoc} */ public function installDefaultConfig($type, $name) { diff --git a/core/lib/Drupal/Core/Extension/ThemeHandler.php b/core/lib/Drupal/Core/Extension/ThemeHandler.php index db22e5f..08eea95 100644 --- a/core/lib/Drupal/Core/Extension/ThemeHandler.php +++ b/core/lib/Drupal/Core/Extension/ThemeHandler.php @@ -103,26 +103,33 @@ class ThemeHandler implements ThemeHandlerInterface { * The cache backend to clear the local tasks cache. * @param \Drupal\Core\Extension\InfoParserInterface $info_parser * The info parser to parse the theme.info.yml files. - * @param \Drupal\Core\Config\ConfigInstallerInterface $config_installer - * (optional) The config installer to install configuration. This optional - * to allow the theme handler to work before Drupal is installed and has a - * database. * @param \Drupal\Core\Routing\RouteBuilder $route_builder * (optional) The route builder to rebuild the routes if a theme is enabled. * @param \Drupal\Core\Extension\ExtensionDiscovery $extension_discovery * (optional) A extension discovery instance (for unit tests). */ - public function __construct(ConfigFactoryInterface $config_factory, ModuleHandlerInterface $module_handler, CacheBackendInterface $cache_backend, InfoParserInterface $info_parser, ConfigInstallerInterface $config_installer = NULL, RouteBuilder $route_builder = NULL, ExtensionDiscovery $extension_discovery = NULL) { + public function __construct(ConfigFactoryInterface $config_factory, ModuleHandlerInterface $module_handler, CacheBackendInterface $cache_backend, InfoParserInterface $info_parser, RouteBuilder $route_builder = NULL, ExtensionDiscovery $extension_discovery = NULL) { $this->configFactory = $config_factory; $this->moduleHandler = $module_handler; $this->cacheBackend = $cache_backend; $this->infoParser = $info_parser; - $this->configInstaller = $config_installer; $this->routeBuilder = $route_builder; $this->extensionDiscovery = $extension_discovery; } /** + * Sets the config installer. + * + * @param \Drupal\Core\Config\ConfigInstallerInterface $config_installer + * (optional) The config installer to install configuration. This optional + * to allow the theme handler to work before Drupal is installed and has a + * database. + */ + public function setConfigInstaller(ConfigInstallerInterface $config_installer) { + $this->configInstaller = $config_installer; + } + + /** * {@inheritdoc} */ public function enable(array $theme_list) {