From fe8ab04c3b583e53aa80d19376734468fca57432 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?p=C3=A9c=C3=A9?= Date: Sun, 29 Mar 2020 23:24:17 +0200 Subject: [PATCH] Fix Twig compatibility --- src/Twig/EasyAdminExtensionTwigExtension.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Twig/EasyAdminExtensionTwigExtension.php b/src/Twig/EasyAdminExtensionTwigExtension.php index 5db1248a..1a7027e6 100644 --- a/src/Twig/EasyAdminExtensionTwigExtension.php +++ b/src/Twig/EasyAdminExtensionTwigExtension.php @@ -6,6 +6,7 @@ use EasyCorp\Bundle\EasyAdminBundle\Configuration\ConfigManager as EntityConfigManager; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\Routing\RouterInterface; +use Twig\Environment; use Twig\Extension\AbstractExtension; use Twig\TwigFunction; @@ -37,7 +38,7 @@ public function getFunctions() } public function getActionsForItem( - \Twig_Environment $twig, string $view, string $objectType, string $objectName + Environment $twig, string $view, string $objectType, string $objectName ) { if ('document' === $objectType && $twig->getFunction('easyadmin_mongo_odm_get_actions_for_*_item')) { $function = $twig->getFunction('easyadmin_mongo_odm_get_actions_for_*_item'); @@ -49,7 +50,7 @@ public function getActionsForItem( } public function renderObjectField( - \Twig_Environment $twig, string $view, string $objectType, string $objectName, $item, array $fieldMetadata + Environment $twig, string $view, string $objectType, string $objectName, $item, array $fieldMetadata ) { if ('document' === $objectType && $twig->getFunction('easyadmin_mongo_odm_render_field_for_*_view')) { $function = $twig->getFunction('easyadmin_mongo_odm_render_field_for_*_view');