From 6d903848ab2ce46875c7bca8cb67fed77b29a132 Mon Sep 17 00:00:00 2001 From: Guy Sartorelli <36352093+GuySartorelli@users.noreply.github.com> Date: Thu, 30 Nov 2023 11:39:14 +1300 Subject: [PATCH] FIX Don't replace config manifest for nested kernels (#11082) --- src/Core/BaseKernel.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/Core/BaseKernel.php b/src/Core/BaseKernel.php index fd256b0a0..9374b8ef2 100644 --- a/src/Core/BaseKernel.php +++ b/src/Core/BaseKernel.php @@ -115,11 +115,13 @@ abstract class BaseKernel implements Kernel $this->setModuleLoader($moduleLoader); // Config loader - // @todo refactor CoreConfigFactory - $configFactory = new CoreConfigFactory($manifestCacheFactory); - $configManifest = $configFactory->createRoot(); $configLoader = ConfigLoader::inst(); - $configLoader->pushManifest($configManifest); + // If nesting kernels, don't create a new config manifest as that will reset config deltas + if (!$configLoader->hasManifest()) { + $configFactory = new CoreConfigFactory($manifestCacheFactory); + $configManifest = $configFactory->createRoot(); + $configLoader->pushManifest($configManifest); + } $this->setConfigLoader($configLoader); // Load template manifest