Skip to content

Commit b05ff85

Browse files
derrabussymfonyaml
authored and
symfonyaml
committed
[TwigBridge] Avoid calling deprecated mergeGlobals()
1 parent 09db899 commit b05ff85

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
@@ -44,7 +44,7 @@ public function renderBlock(FormView $view, $resource, string $blockName, array
4444
{
4545
$cacheKey = $view->vars[self::CACHE_KEY_VAR];
4646

47-
$context = $this->environment->mergeGlobals($variables);
47+
$context = $variables + $this->environment->getGlobals();
4848

4949
ob_start();
5050

@@ -164,7 +164,7 @@ protected function loadResourcesFromTheme(string $cacheKey, &$theme)
164164
// theme is a reference and we don't want to change it.
165165
$currentTheme = $theme;
166166

167-
$context = $this->environment->mergeGlobals([]);
167+
$context = $this->environment->getGlobals();
168168

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

0 commit comments

Comments
 (0)