From 4203a0b20c1e55d2eb8c4fd062eed35d8ce92f27 Mon Sep 17 00:00:00 2001 From: David Maicher Date: Sun, 19 Nov 2023 19:17:20 +0100 Subject: [PATCH] Use block-bundle ^5.0 --- composer.json | 2 +- src/Block/AuditBlockService.php | 1 - tests/App/AppKernel.php | 5 +---- tests/Block/AuditBlockServiceTest.php | 3 --- 4 files changed, 2 insertions(+), 9 deletions(-) diff --git a/composer.json b/composer.json index 29a34b747..b1992a42b 100644 --- a/composer.json +++ b/composer.json @@ -60,7 +60,7 @@ "psalm/plugin-phpunit": "^0.18", "psalm/plugin-symfony": "^5.0", "rector/rector": "^0.18", - "sonata-project/block-bundle": "^4.2", + "sonata-project/block-bundle": "^5.0", "sonata-project/entity-audit-bundle": "^1.1", "symfony/browser-kit": "^5.4 || ^6.2", "symfony/css-selector": "^5.4 || ^6.2", diff --git a/src/Block/AuditBlockService.php b/src/Block/AuditBlockService.php index bede6cafa..a5c39d7d8 100644 --- a/src/Block/AuditBlockService.php +++ b/src/Block/AuditBlockService.php @@ -35,7 +35,6 @@ public function __construct( public function execute(BlockContextInterface $blockContext, ?Response $response = null): Response { $template = $blockContext->getTemplate(); - \assert(null !== $template); $limit = $blockContext->getSetting('limit'); \assert(\is_int($limit)); diff --git a/tests/App/AppKernel.php b/tests/App/AppKernel.php index c67607fb1..3164812e1 100644 --- a/tests/App/AppKernel.php +++ b/tests/App/AppKernel.php @@ -78,10 +78,7 @@ protected function configureRoutes(RoutingConfigurator $routes): void { $routes->import(sprintf('%s/config/routes.yaml', $this->getProjectDir())); } - - /** - * @psalm-suppress DeprecatedClass - */ + protected function configureContainer(ContainerBuilder $container, LoaderInterface $loader): void { $container->setParameter('app.base_dir', $this->getBaseDir()); diff --git a/tests/Block/AuditBlockServiceTest.php b/tests/Block/AuditBlockServiceTest.php index 595812ac1..0e03291e3 100644 --- a/tests/Block/AuditBlockServiceTest.php +++ b/tests/Block/AuditBlockServiceTest.php @@ -86,11 +86,8 @@ public function testDefaultSettings(): void self::assertSettings([ 'attr' => [], - 'extra_cache_keys' => [], 'limit' => 10, 'template' => '@SonataDoctrineORMAdmin/Block/block_audit.html.twig', - 'ttl' => 0, - 'use_cache' => true, ], $blockContext); } }