Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
Drupal Environment
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Composer
plugin
Drupal Environment
Merge requests
!374
Merging develop into main
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Merging develop into main
develop
into
main
Overview
0
Commits
1
Pipelines
1
Changes
3
Merged
GitLab CI
requested to merge
develop
into
main
4 months ago
Overview
0
Commits
1
Pipelines
1
Changes
3
Expand
0
0
Merge request reports
Compare
main
main (base)
and
latest version
latest version
2dee451d
1 commit,
4 months ago
3 files
+
34
−
2
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
3
Search (e.g. *.vue) (Ctrl+P)
patches/d10/3492453.diff
0 → 100644
+
30
−
0
Options
diff --git a/core/lib/Drupal/Core/Installer/InstallerKernel.php b/core/lib/Drupal/Core/Installer/InstallerKernel.php
index 8f4f1c760dee0882ad0cff4f29dd8a5c3fe5d9c8..23f329eff551b67d86f8e2c69ebe7d26bd86e5ad 100644
--- a/core/lib/Drupal/Core/Installer/InstallerKernel.php
+++ b/core/lib/Drupal/Core/Installer/InstallerKernel.php
@@ -3,6 +3,7 @@
namespace Drupal\Core\Installer;
use Drupal\Core\DrupalKernel;
+use Symfony\Component\DependencyInjection\ContainerInterface;
/**
* Extend DrupalKernel to handle force some kernel behaviors.
@@ -83,4 +84,17 @@
public static function installationAttempted() {
return isset($GLOBALS['install_state']) && empty($GLOBALS['install_state']['installation_finished']);
}
+ /**
+ * {@inheritdoc}
+ */
+ protected function attachSynthetic(ContainerInterface $container): void {
+ parent::attachSynthetic($container);
+
+ // Reset any existing container in order to avoid holding on to old object
+ // references, otherwise memory usage grows exponentially with each rebuild
+ // when multiple modules are being installed.
+ // @todo Move this to the parent class after https://www.drupal.org/i/2066993
+ $this->container?->reset();
+ }
+
}
Loading