silverstripe / silverstripe-framework

Silverstripe Framework, the MVC framework that powers Silverstripe CMS
https://www.silverstripe.org
BSD 3-Clause "New" or "Revised" License
721 stars 821 forks source link

FIX Don't replace config manifest for nested kernels #11082

Closed GuySartorelli closed 10 months ago

GuySartorelli commented 10 months ago

If nesting kernels, the same instance of ConfigLoader is used for both kernels. The result is that if there were any runtime changes to configuration (i.e. MyClass::config()->set()), these changes are discarded for both kernels.

For production scenarios this isn't likely to cause problems, because runtime configuration changes are probably made inside _config.php files which are also re-executed, but for unit tests this can cause problems as seen in https://github.com/silverstripe/silverstripe-staticpublishqueue/pull/178

Issue