You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feature #6656 Use the Twig guard tag (javiereguiluz)
This PR was squashed before being merged into the 4.x branch.
Discussion
----------
Use the Twig guard tag
Twig 3.5 added the nice `guard` tag (https://twig.symfony.com/doc/3.x/tags/guard.html) to solve problems like the ones we have. So, let's use it.
Commits
-------
99f4f73 Use the Twig guard tag
newTwigFunction('ea_call_function_if_exists', [$this, 'callFunctionIfExists'], ['needs_environment' => true, 'is_safe' => ['html' => true], 'deprecation_info' => newDeprecatedCallableInfo('easycorp/easyadmin-bundle', '4.21.0', 'No alternative is provided because it\'s no longer needed thanks to the Twig guard tag.')]),
52
+
newTwigFunction('ea_create_field_layout', [$this, 'createFieldLayout'], ['deprecation_info' => newDeprecatedCallableInfo('easycorp/easyadmin-bundle', '4.8.0', 'No alternative is provided because it\'s no longer needed thanks to the new rendering engine')]),
53
+
newTwigFunction('ea_csrf_token', [$this, 'renderCsrfToken'], ['deprecation_info' => newDeprecatedCallableInfo('easycorp/easyadmin-bundle', '4.21.0', 'No alternative is provided because it\'s no longer needed thanks to the Twig guard tag.')]),
54
+
newTwigFunction('ea_importmap', [$this, 'renderImportmap'], ['is_safe' => ['html'], 'deprecation_info' => newDeprecatedCallableInfo('easycorp/easyadmin-bundle', '4.21.0', 'No alternative is provided because it\'s no longer needed thanks to the Twig guard tag.')]),
55
+
newTwigFunction('ea_ux_icon', [$this, 'renderIcon'], ['is_safe' => ['html'], 'deprecation_info' => newDeprecatedCallableInfo('easycorp/easyadmin-bundle', '4.21.0', 'No alternative is provided because it\'s no longer needed thanks to the Twig guard tag.')]),
55
56
];
56
57
}
57
58
@@ -60,8 +61,9 @@ public function getFilters(): array
newTwigFilter('ea_apply_filter_if_exists', [$this, 'applyFilterIfExists'], ['needs_environment' => true, 'deprecation_info' => newDeprecatedCallableInfo('easycorp/easyadmin-bundle', '4.21.0', 'No alternative is provided because it\'s no longer needed thanks to the Twig guard tag.')]),
65
67
];
66
68
}
67
69
@@ -226,12 +228,6 @@ public function renderCsrfToken(string $tokenId): string
0 commit comments