From 9d85f0a24d450c1bedfe1572747728a1520db212 Mon Sep 17 00:00:00 2001 From: Sally Young Date: Mon, 7 Apr 2025 17:10:14 +0100 Subject: [PATCH] Flush all caches after installing a module --- core-dev/src/Command/ModuleInstallCommand.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/core-dev/src/Command/ModuleInstallCommand.php b/core-dev/src/Command/ModuleInstallCommand.php index b6dc17e..8b43c9e 100644 --- a/core-dev/src/Command/ModuleInstallCommand.php +++ b/core-dev/src/Command/ModuleInstallCommand.php @@ -29,8 +29,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int $module_installer = \Drupal::service('module_installer'); assert($module_installer instanceof ModuleInstallerInterface); $module_installer->install($modules); - $kernel = \Drupal::service('kernel'); - $kernel->rebuildContainer(); + drupal_flush_all_caches(); } return 0; }