Issue #3291830 by webflo: Fix PSR4 path for database driver

(cherry picked from commit a80dddcc3a)
merge-requests/1691/head
Alex Pott 2022-06-29 11:36:35 +01:00
parent 7bab6e696b
commit 89faf41386
No known key found for this signature in database
GPG Key ID: BDA67E7EE836E5CE
2 changed files with 2 additions and 2 deletions

View File

@ -190,7 +190,7 @@ final class Settings {
// the database. Therefore, allow the connection info to specify an
// autoload directory for the driver.
if (isset($info['autoload'])) {
$class_loader->addPsr4($info['namespace'] . '\\', $info['autoload']);
$class_loader->addPsr4($info['namespace'] . '\\', $app_root . '/' . $info['autoload']);
}
}
}

View File

@ -336,7 +336,7 @@ class SettingsTest extends UnitTestCase {
if (!empty($expected_autoload)) {
$class_loader->expects($this->once())
->method('addPsr4')
->with($expected_namespace . '\\', $expected_autoload);
->with($expected_namespace . '\\', vfsStream::url('root') . '/' . $expected_autoload);
}
else {
$class_loader->expects($this->never())