Automatically enable the module that is providing the current database driver

Created on 21 April 2020, over 4 years ago
Updated 11 September 2023, about 1 year ago

Problem/Motivation

The module that is providing the current database driver cannot override backend services, plugins and EntityStorage classes during installation.

Proposed resolution

Automatically install/enable the module that is providing the current database driver during install process. Doing so right before or after the installation of the "system" module. In that way the module that is providing the current database can override everything it needs to (during the install process) in all other modules.

Remaining tasks


Review
Commit

User interface changes

None

API changes

Two new methods are added to the class Drupal\Core\Database\Connection: getProvider() and enableModuleProvidingDatabaseDriver(). The method getProvider() takes no parameters and returns the name of the module that is providing the database driver or "core" when there is no such module. The method enableModuleProvidingDatabaseDriver() also takes no parameters and enables the module that is providing the database driver. If there is no such module or that module is already enabled then the method does nothing.

Data model changes

None

Release notes snippet

TBD

📌 Task
Status

Fixed

Version

9.2

Component
Database 

Last updated 2 days ago

  • Maintained by
  • 🇳🇱Netherlands @daffie
Created by

🇳🇱Netherlands daffie

Live updates comments and jobs are added and updated live.
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.71.5 2024