Skip to content
Snippets Groups Projects
Commit 7bd98dd0 authored by catch's avatar catch
Browse files

Issue #3294299 by phma, alexpott, pooja saraah, mikelutz: Regression in...

Issue #3294299 by phma, alexpott, pooja saraah, mikelutz: Regression in functional test performance with a large number of modules

(cherry picked from commit fea90e52)
parent 75b383e5
No related branches found
No related tags found
23 merge requests!8506Draft: Issue #3456536 by ibrahim tameme,!5646Issue #3350972 by nod_: [random test failure]...,!5600Issue #3350972 by nod_: [random test failure]...,!5343Issue #3305066 by quietone, Rename RedirectLeadingSlashesSubscriber,!3603#ISSUE 3346218 Add a different message on edit comment,!3555Issue #2473873: Views entity operations lack cacheability support, resulting in incorrect dropbuttons,!3494Issue #3327018 by Spokje, longwave, xjm, mondrake: Update PHPStan to 1.9.3 and...,!3410Issue #3340128: UserLoginForm::submitForm has some dead code,!3389Issue #3325184 by Spokje, andypost, xjm, smustgrave: $this->configFactory is...,!3381Issue #3332363: Refactor Claro's menus-and-lists stylesheet,!3307Issue #3326193: CKEditor 5 can grow past the viewport when there is a lot of content,!3236Issue #3332419: Refactor Claro's messages stylesheet,!3231Draft: Issue #3049525 by longwave, fougere, larowlan, kim.pepper, AaronBauman, Wim...,!3212Issue #3294003: Refactor Claro's entity-meta stylesheet,!3194Issue #3330981: Fix PHPStan L1 error "Relying on entity queries to check access by default is deprecated...",!3143Issue #3313342: [PHP 8.1] Deprecated function: strpos(): Passing null to parameter #1 LayoutBuilderUiCacheContext.php on line 28,!3024Issue #3307509: Empty option for views bulk form,!2972Issue #1845004: Replace custom password hashing library with PHP 5.5 password_hash(),!2719Issue #3110137: Remove Classy from core.,!2688Issue #3261452: [PP-1] Remove tracker module from core,!2437Issue #3238257 by hooroomoo, Wim Leers: Fragment link pointing to <textarea>...,!2296Issue #3100732: Allow specifying `meta` data on JSON:API objects,!1626Issue #3256642: Make life better for database drivers that extend another database driver
......@@ -96,7 +96,7 @@ public function __construct($root, $site_path, array $enabled_extensions, KeyVal
* A list of post-update functions that have been removed.
*/
public function getRemovedPostUpdates($extension) {
$this->scanExtensionsAndLoadUpdateFiles();
$this->scanExtensionsAndLoadUpdateFiles($extension);
$function = "{$extension}_removed_post_updates";
if (function_exists($function)) {
return $function();
......@@ -246,7 +246,7 @@ public function registerInvokedUpdates(array $function_names) {
* A list of update functions.
*/
public function getUpdateFunctions($extension_name) {
$this->scanExtensionsAndLoadUpdateFiles();
$this->scanExtensionsAndLoadUpdateFiles($extension_name);
$all_functions = $this->getAvailableUpdateFunctions();
return array_filter($all_functions, function ($function_name) use ($extension_name) {
......@@ -257,15 +257,24 @@ public function getUpdateFunctions($extension_name) {
/**
* Scans all module, theme, and profile extensions and load the update files.
*
* @param string|null $extension
* (optional) Limits the extension update files loaded to the provided
* extension.
*/
protected function scanExtensionsAndLoadUpdateFiles() {
protected function scanExtensionsAndLoadUpdateFiles(string $extension = NULL) {
// Scan for extensions.
$extension_discovery = new ExtensionDiscovery($this->root, FALSE, [], $this->sitePath);
$extension_discovery = new ExtensionDiscovery($this->root, TRUE, [], $this->sitePath);
$module_extensions = $extension_discovery->scan('module');
$theme_extensions = $this->includeThemes() ? $extension_discovery->scan('theme') : [];
$profile_extensions = $extension_discovery->scan('profile');
$extensions = array_merge($module_extensions, $theme_extensions, $profile_extensions);
// Limit to a single extension.
if ($extension) {
$extensions = array_intersect_key($extensions, [$extension => TRUE]);
}
$this->loadUpdateFiles($extensions);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment