Extract the install/uninstall functionality to a ThemeInstaller

Created on 5 April 2015, about 9 years ago
Updated 28 March 2023, about 1 year ago

Problem/Motivation

We want to load as few as code as possible on requests, unless needed.

Currently the ThemeHandler has quite a lot of dependencies:

public function __construct($root, ConfigFactoryInterface $config_factory, ModuleHandlerInterface $module_handler, StateInterface $state, InfoParserInterface $info_parser,LoggerInterface $logger, AssetCollectionOptimizerInterface $css_collection_optimizer = NULL, ConfigInstallerInterface $config_installer = NULL, ConfigManagerInterface $config_manager = NULL, RouteBuilderInterface $route_builder = NULL, ExtensionDiscovery $extension_discovery = NULL) {

Another problem is that the module_installer exists, but the theme_handler is still responsible for installing

Proposed resolution

Move the installation code of themes into its separate entity, called ThemeInstaller.
That itself improves the performance a bit.

As BC layer we can keep ThemeHandler::install() but just call out to the other code.

Remaining tasks

User interface changes

API changes

  • New service called theme_installer
  • theme_handler->install() => theme_install->install()
  • theme_handler->uninstall() => theme_install->uninstall()

Beta phase evaluation

📌 Task
Status

Fixed

Version

8.0 ⚰️

Component
Theme 

Last updated about 4 hours ago

Created by

🇩🇪Germany dawehner

Live updates comments and jobs are added and updated live.
  • Performance

    It affects performance. It is often combined with the Needs profiling tag.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024