diff --git a/patches/d10-3.json b/patches/d10-3.json index adc821fe7966b54631ba5738b33f570ca7632737..3aa70307e689e0605f631a62166d8237729e5e5a 100644 --- a/patches/d10-3.json +++ b/patches/d10-3.json @@ -81,7 +81,8 @@ "#944582 File System Permissions": "https://www.drupal.org/files/issues/2024-01-16/944582-10.2.x-192.patch", "#2849279 Inconsistent changed timestamps when moderated entity": "https://gitlab.lakedrops.com/composer/plugin/drupal-environment/-/raw/main/patches/d10/2849279.patch", "#3043725 Provide a Entity Handler for user cancellation": "https://gitlab.lakedrops.com/composer/plugin/drupal-environment/-/raw/main/patches/d10/3043725-104.diff", - "#3473763 locale_string_is_safe should accept \"<front>\" as being safe": "https://gitlab.lakedrops.com/composer/plugin/drupal-environment/-/raw/main/patches/d10/3473763.diff" + "#3473763 locale_string_is_safe should accept \"<front>\" as being safe": "https://gitlab.lakedrops.com/composer/plugin/drupal-environment/-/raw/main/patches/d10/3473763.diff", + "#3492453 Memory leak in DrupalKernel when installing modules": "https://gitlab.lakedrops.com/composer/plugin/drupal-environment/-/raw/main/patches/d10/3492453.diff" }, "drupal/dashboards": { "#3366586 Shortcut error": "https://git.drupalcode.org/project/dashboards/-/merge_requests/26.diff" diff --git a/patches/d10-4.json b/patches/d10-4.json index 52506a658a374e9e5ce24bffea77f7703f46956b..39b2f6e08687441968d31e6eb17613eccbeb0114 100644 --- a/patches/d10-4.json +++ b/patches/d10-4.json @@ -81,7 +81,8 @@ "#944582 File System Permissions": "https://www.drupal.org/files/issues/2024-01-16/944582-10.2.x-192.patch", "#2849279 Inconsistent changed timestamps when moderated entity": "https://gitlab.lakedrops.com/composer/plugin/drupal-environment/-/raw/main/patches/d10/2849279.patch", "#3043725 Provide a Entity Handler for user cancellation": "https://gitlab.lakedrops.com/composer/plugin/drupal-environment/-/raw/main/patches/d10/3043725-104.diff", - "#3473763 locale_string_is_safe should accept \"<front>\" as being safe": "https://gitlab.lakedrops.com/composer/plugin/drupal-environment/-/raw/main/patches/d10/3473763.diff" + "#3473763 locale_string_is_safe should accept \"<front>\" as being safe": "https://gitlab.lakedrops.com/composer/plugin/drupal-environment/-/raw/main/patches/d10/3473763.diff", + "#3492453 Memory leak in DrupalKernel when installing modules": "https://gitlab.lakedrops.com/composer/plugin/drupal-environment/-/raw/main/patches/d10/3492453.diff" }, "drupal/dashboards": { "#3366586 Shortcut error": "https://git.drupalcode.org/project/dashboards/-/merge_requests/26.diff" diff --git a/patches/d10/3492453.diff b/patches/d10/3492453.diff new file mode 100644 index 0000000000000000000000000000000000000000..2e69c5f8c162d24c0268aed3cb97632f8dad9f4c --- /dev/null +++ b/patches/d10/3492453.diff @@ -0,0 +1,30 @@ +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(); ++ } ++ + }