Problem/Motivation
#3256642: Introduce database driver extensions and autoload database drivers' dependencies was added in 10.2, which can break Functional test setup in some enviroments.
The additions included the following in install.core.inc in install_get_form()
if (!empty($install_state['forms'][$install_form_id])) {
$values = $install_state['forms'][$install_form_id];
// 👇 HEY! this will crash some Functional Test setups, because \Drupal\Core\Test\FunctionalTestSetupTrait::installParameters
// unsets that property if only one database type is available, but the below assumes it is always set.
if ($install_form_id === 'install_settings_form' && !str_contains($values['driver'], "\\")) {
@trigger_error("Passing a database driver name '{$values['driver']}' to " . __FUNCTION__ . '() is deprecated in drupal:10.2.0 and is removed from drupal:11.0.0. Pass a database driver namespace instead. See https://www.drupal.org/node/3258175', E_USER_DEPRECATED);
$driverExtension = Database::getDriverList()->getFromDriverName($values['driver']);
$tmp = [];
$tmp['driver'] = $driverExtension->getName();
$tmp[$driverExtension->getName()] = $values[$values['driver']];
$values = $tmp;
}
$form_state->setValues($values);
}
Steps to reproduce
Proposed resolution
Toss an isset() in the statement that currently assumes it is set
Remaining tasks
User interface changes
API changes
Data model changes
Release notes snippet
Issue fork drupal-3410093
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
bnjmnmComment #4
mondrakeI was going to suggest adding a test, then realized this code is BC to be removed for 11, so not sure it’s worth it. RTBC, thanks
Comment #5
quietone commentedChanging title per Special titles.
Comment #6
alexpottCommitted and pushed ec721fbabb to 11.x and 0d0bcc3bb0 to 10.2.x. Thanks!