Skip to content

Commit 3a2e3d9

Browse files
committed
Merge branch '7.1' into 7.2
* 7.1: [TwigBridge] Avoid calling deprecated mergeGlobals()
2 parents 8c36ddb + 45700d7 commit 3a2e3d9

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

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

152-
$context = $this->environment->mergeGlobals([]);
152+
$context = $this->environment->getGlobals();
153153

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

0 commit comments

Comments
 (0)