Change record status: 
Project: 
Introduced in branch: 
9.1.x
Introduced in version: 
9.1.0
Description: 

The backend overridable service discovery now also checks the database type for an overridden service.

The backend overridable discovery first checks for backend override with the driver name of the current database connection. When that fails the backend overridable service discovery then checks for a backend override with the databasetype of the current database connection.

For more information about backend overridable service discovery, see https://www.drupal.org/node/2306083.

For example take the module https://www.drupal.org/project/pgsql_fallback. That module has a database driver for PostgreSQL. The driver name is 'PgsqlFallback' and the database type is 'pgsql'. This database driver can now override a backend service in two ways:

// With the driver name.
config.storage:
  alias: PgsqlFallback.config.storage

// With the database type.
config.storage:
  alias: pgsql.config.storage

When the by Drupal core supported database driver for PostgreSQL has overridden a backend service, the module 'pgsql_fallback' does not need to also override the backend service. It can fallback to the override with its database type.

Impacts: 
Module developers