Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit adc87ad

Browse filesBrowse files
committed
bug #58207 [TwigBridge] Avoid calling deprecated mergeGlobals() (derrabus)
This PR was merged into the 5.4 branch. Discussion ---------- [TwigBridge] Avoid calling deprecated mergeGlobals() | Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Issues | Follows twigphp/Twig#4283 | License | MIT `getGlobals()` is documented as the official replacement for `mergeGlobals()` despite being flagged ``@internal``. I've left a comment on the upstream PR. Commits ------- 2883331 [TwigBridge] Avoid calling deprecated mergeGlobals()
2 parents 7518cc7 + 2883331 commit adc87ad
Copy full SHA for adc87ad

File tree

1 file changed

+2
-2
lines changed
Filter options

1 file changed

+2
-2
lines changed

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

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/Twig/Form/TwigRendererEngine.php
+2-2Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.