Date Published: September 27, 2023
Workaround for DB connection issue in upgrading to Drupal 9.4.x
Important note: This Issue has been fix on the Acquia Platform. Do not use this workaround.When upgrading to Drupal 9.4.7 or later you may get the following error:
Cannot instantiate abstract class Drupal\Core\Database\Schema in
Drupal\Core\Database\Connection->schema()
While we are working on a permanent fix on this issue, as a temporary workaround you could add the following line into your
settings.php file:
$class_loader->addPsr4('Drupal\\mysql\\', 'core/modules/mysql/src/');
Current code:
// Acquia include settings.
if (file_exists('/var/www/site-php')) {
// Acquia require line
require '/var/www/site-php/XXX/XXX-settings.inc';
}
Update to:
// Acquia include settings.
if (file_exists('/var/www/site-php')) {
// Workaround for database error
$class_loader->addPsr4('Drupal\\mysql\\', 'core/modules/mysql/src/');
// Acquia require line
require '/var/www/site-php/XXX/XXX-settings.inc';
}
Please note this workaround should be tested on lower environments (dev or stage)
before applying to a production environment.
Did not find what you were looking for?
If this content did not answer your questions, try searching or contacting our support team for further assistance.