Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor performance improvement in DatabaseAdapterRegistry::autoconfigure() #9361

Merged
merged 1 commit into from
Jan 14, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions src/Dev/Install/DatabaseAdapterRegistry.php
Original file line number Diff line number Diff line change
Expand Up @@ -145,12 +145,8 @@ public static function autoconfigure(&$config = null)
$databaseConfig = $config;
}
// Search through all composer packages in vendor, updating $databaseConfig
foreach (glob(BASE_PATH . '/vendor/*', GLOB_ONLYDIR) as $vendor) {
foreach (glob($vendor . '/*', GLOB_ONLYDIR) as $directory) {
if (file_exists($directory . '/_configure_database.php')) {
include_once($directory . '/_configure_database.php');
}
}
foreach (glob(BASE_PATH . '/vendor/*/*/_configure_database.php') as $configFile) {
include_once $configFile;
}
// Update modified variable
$config = $databaseConfig;
Expand Down