ModuleHandler should not maintain list of installed modules now that ModuleExtensionList exists

Created on 31 January 2018, over 6 years ago
Updated 9 March 2024, 3 months ago

Problem/Motivation

After #2208429: Extension System, Part III: ExtensionList, ModuleExtensionList and ProfileExtensionList → , we now have a canonical repository for modules in a Drupal installation as well as a list of installed modules in configuration storage via 'core.extension:module' config key.

However, that issue did not remove a duplicate storage of installed modules in ModuleHandler::moduleList(). Now that we have a canonical repository for extensions, the list of installed extensions should be in those, while ModuleHandler may only hold a cached copy for performance reasons.

Proposed Resolution

  • Remove the moduleList from ModuleHandler and only retain a locally cached copy for performance reasons
  • Deprecate ModuleHandler::getModuleList() and replace with ModuleExtensionList::getInstalled()

This helps avoid potential inconsistencies in the code and enforces separation of concerns.

API Changes

ModuleHandler::getModuleList() is deprecated. New method in ExtensionList::getInstalled() that allows the list of installed extensions to be obtained as a replacement for ModuleHandler::getModuleList()

📌 Task
Status

Needs work

Version

11.0 🔥

Component
Extension  →

Last updated 3 days ago

No maintainer
Created by

🇳🇬Nigeria almaudoh

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

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