From 978b78ae797224bc1fdf1fad7ff0576f039d72c8 Mon Sep 17 00:00:00 2001 From: "Alexander M. Turek" Date: Mon, 9 Sep 2024 09:01:20 +0200 Subject: [PATCH] [TwigBridge] Avoid calling deprecated mergeGlobals() --- Form/TwigRendererEngine.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Form/TwigRendererEngine.php b/Form/TwigRendererEngine.php index b17da340..e94dd2e4 100644 --- a/Form/TwigRendererEngine.php +++ b/Form/TwigRendererEngine.php @@ -44,7 +44,7 @@ public function renderBlock(FormView $view, $resource, string $blockName, array { $cacheKey = $view->vars[self::CACHE_KEY_VAR]; - $context = $this->environment->mergeGlobals($variables); + $context = $variables + $this->environment->getGlobals(); ob_start(); @@ -164,7 +164,7 @@ protected function loadResourcesFromTheme(string $cacheKey, &$theme) // theme is a reference and we don't want to change it. $currentTheme = $theme; - $context = $this->environment->mergeGlobals([]); + $context = $this->environment->getGlobals(); // The do loop takes care of template inheritance. // Add blocks from all templates in the inheritance tree, but avoid