From 6606924dae44f86917c339747473e371034120a7 Mon Sep 17 00:00:00 2001 From: Vincent Langlet Date: Mon, 20 Nov 2023 11:25:15 +0100 Subject: [PATCH] Fix deprecation (#2423) --- composer.json | 2 +- src/Controller/GalleryAdminController.php | 2 +- src/Controller/MediaAdminController.php | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/composer.json b/composer.json index 888c73100..8bf2aa85d 100644 --- a/composer.json +++ b/composer.json @@ -85,7 +85,7 @@ "psalm/plugin-phpunit": "^0.18", "psalm/plugin-symfony": "^5.0", "rector/rector": "^0.18", - "sonata-project/admin-bundle": "^4.9", + "sonata-project/admin-bundle": "^4.28", "sonata-project/block-bundle": "^4.11 || ^5.0", "sonata-project/classification-bundle": "^4.0", "sonata-project/doctrine-orm-admin-bundle": "^4.0", diff --git a/src/Controller/GalleryAdminController.php b/src/Controller/GalleryAdminController.php index cb4b571c0..f8fb86486 100644 --- a/src/Controller/GalleryAdminController.php +++ b/src/Controller/GalleryAdminController.php @@ -56,7 +56,7 @@ public function listAction(Request $request): Response $exportFormats = $exporter->getAvailableFormats($this->admin); } - return $this->renderWithExtraParams($this->admin->getTemplateRegistry()->getTemplate('list'), [ + return $this->render($this->admin->getTemplateRegistry()->getTemplate('list'), [ 'action' => 'list', 'form' => $formView, 'datagrid' => $datagrid, diff --git a/src/Controller/MediaAdminController.php b/src/Controller/MediaAdminController.php index 8c39e07f5..17208eba6 100644 --- a/src/Controller/MediaAdminController.php +++ b/src/Controller/MediaAdminController.php @@ -44,7 +44,7 @@ public function createAction(Request $request): Response $pool = $this->container->get('sonata.media.pool'); \assert($pool instanceof Pool); - return $this->renderWithExtraParams('@SonataMedia/MediaAdmin/select_provider.html.twig', [ + return $this->render('@SonataMedia/MediaAdmin/select_provider.html.twig', [ 'providers' => $pool->getProvidersByContext( $request->query->get('context', $pool->getDefaultContext()) ), @@ -128,7 +128,7 @@ public function listAction(Request $request): Response $exportFormats = $exporter->getAvailableFormats($this->admin); } - return $this->renderWithExtraParams($this->admin->getTemplateRegistry()->getTemplate('list'), [ + return $this->render($this->admin->getTemplateRegistry()->getTemplate('list'), [ 'action' => 'list', 'form' => $formView, 'datagrid' => $datagrid,