Change record status: 
Project: 
Introduced in branch: 
8.9.x
Introduced in version: 
8.9.0-beta1
Description: 

Both prior to and after this change, if you have a custom database driver named the same as a core one (e.g., 'mysql'), and you have this in your settings.php:

$databases['default']['default'] = array (
  ...
  'namespace' => 'Drupal\\Driver\\Database\\mysql'
);

then your custom driver is used instead of the core one for all requests that use this database connection info from settings.php as the way to connect to your database, which includes all regular web requests.

However, some requests do not use the database connection info from settings.php. These include:

  • The installer, when settings.php has not yet been populated.
  • Console commands that pass a db-url option.
  • Tests that get the database URL from the SIMPLETEST_DB environment variable.

Prior to this change, these types of requests would use the core driver. After this change, these requests use the custom driver, if one exists in your codebase.

This change does not change any behavior for custom drivers that are named differently than core ones. Those could already be resolved uniquely from the driver name or database connection URL.

Impacts: 
Site builders, administrators, editors
Module developers
Updates Done (doc team, etc.)
Online documentation: 
Not done
Theming guide: 
Not done
Module developer documentation: 
Not done
Examples project: 
Not done
Coder Review: 
Not done
Coder Upgrade: 
Not done
Other: 
Other updates done