Skip to content

Commit 82a21a2

Browse files
committed
Merge branch '5.4' into 6.4
* 5.4: [TwigBridge] Avoid calling deprecated mergeGlobals()
2 parents 761cdce + adc87ad commit 82a21a2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Symfony/Bridge/Twig/Form/TwigRendererEngine.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public function renderBlock(FormView $view, mixed $resource, string $blockName,
3434
{
3535
$cacheKey = $view->vars[self::CACHE_KEY_VAR];
3636

37-
$context = $this->environment->mergeGlobals($variables);
37+
$context = $variables + $this->environment->getGlobals();
3838

3939
ob_start();
4040

@@ -151,7 +151,7 @@ protected function loadResourcesFromTheme(string $cacheKey, mixed &$theme)
151151
// theme is a reference and we don't want to change it.
152152
$currentTheme = $theme;
153153

154-
$context = $this->environment->mergeGlobals([]);
154+
$context = $this->environment->getGlobals();
155155

156156
// The do loop takes care of template inheritance.
157157
// Add blocks from all templates in the inheritance tree, but avoid

0 commit comments

Comments
 (0)