- Issue created by @scott_earnest
- Merge request !2Issue #3477448 by scott_earnest: Error when target is an array of connections β (Merged) created by scott_earnest
- πΊπΈUnited States scott_earnest
Attaching test results
- Drupal version: 11.0.4
- PHP version: 8.3.11Prior to including the mysql57 settings.inc file, you can see that the "replica" database is an array of connections:
Defined in the settings.php file as such- per guidance from d.o:
- https://www.drupal.org/docs/drupal-apis/database-api/database-configuration β$databases['default']['default'] = [ 'driver' => 'mysql', 'database' => 'drupaldb1', 'username' => 'username', 'password' => 'secret', 'host' => 'dbserver1', ]; $databases['default']['replica'][] = [ 'driver' => 'mysql', 'database' => 'drupaldb2', 'username' => 'username', 'password' => 'secret', 'host' => 'dbserver2', ]; $databases['default']['replica'][] = [ 'driver' => 'mysql', 'database' => 'drupaldb3', 'username' => 'username', 'password' => 'secret', 'host' => 'dbserver3', ];
After conversion (with patch) - you can see that the databases defined in the "replica" target have updated successfully, and there are no db connection errors:
- First commit to issue fork.
-
effulgentsia β
committed 712ce1f4 on 1.0.x authored by
scott_earnest β
Issue #3477448: Error when target is an array of connections
-
effulgentsia β
committed 712ce1f4 on 1.0.x authored by
scott_earnest β
- πΊπΈUnited States effulgentsia
This is great. Thank you! Merged to 1.0.x.
Automatically closed - issue fixed for 2 weeks with no activity.