From 09dc74c7d444b0817491e1884944be023495a3ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20Ostroluck=C3=BD?= Date: Wed, 2 Aug 2023 21:25:44 +0200 Subject: [PATCH] Add Symfony 7 support --- DependencyInjection/DoctrineExtension.php | 13 -------- .../DoctrineDataCollectorTest.php | 5 ++++ composer.json | 30 +++++++++---------- 3 files changed, 20 insertions(+), 28 deletions(-) diff --git a/DependencyInjection/DoctrineExtension.php b/DependencyInjection/DoctrineExtension.php index 816a9363..faa0d6c3 100644 --- a/DependencyInjection/DoctrineExtension.php +++ b/DependencyInjection/DoctrineExtension.php @@ -1095,19 +1095,6 @@ private function loadValidatorLoader(string $entityManagerName, ContainerBuilder $validatorLoaderDefinition->addTag('validator.auto_mapper', ['priority' => -100]); } - /** - * @param array $objectManager - * @param string $cacheName - * - * @return void - * - * @psalm-suppress MoreSpecificImplementedParamType - */ - public function loadObjectManagerCacheDriver(array $objectManager, ContainerBuilder $container, $cacheName) - { - $this->loadCacheDriver($cacheName, $objectManager['name'], $objectManager[$cacheName . '_driver'], $container); - } - public function getXsdValidationBasePath(): string { return __DIR__ . '/../Resources/config/schema'; diff --git a/Tests/DataCollector/DoctrineDataCollectorTest.php b/Tests/DataCollector/DoctrineDataCollectorTest.php index 63da6c20..f4f2aa00 100644 --- a/Tests/DataCollector/DoctrineDataCollectorTest.php +++ b/Tests/DataCollector/DoctrineDataCollectorTest.php @@ -15,6 +15,7 @@ use Symfony\Bridge\Doctrine\Middleware\Debug\DebugDataHolder; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\HttpKernel\Kernel; use function interface_exists; @@ -132,6 +133,10 @@ public function testGetGroupedQueries(): void /** @group legacy */ public function testGetGroupedQueriesWithDeprecatedDebugStackLogger(): void { + if (Kernel::VERSION_ID >= 70000) { + $this->markTestSkipped('This test requires symfony < 7.0'); + } + $logger = $this->getMockBuilder(DebugStack::class)->getMock(); $logger->queries = []; $logger->queries[] = [ diff --git a/composer.json b/composer.json index 140a5642..cc55583a 100644 --- a/composer.json +++ b/composer.json @@ -34,13 +34,13 @@ "doctrine/dbal": "^3.6.0", "doctrine/persistence": "^2.2 || ^3", "doctrine/sql-formatter": "^1.0.1", - "symfony/cache": "^5.4 || ^6.0", - "symfony/config": "^5.4 || ^6.0", - "symfony/console": "^5.4 || ^6.0", - "symfony/dependency-injection": "^5.4 || ^6.0", + "symfony/cache": "^5.4 || ^6.0 || ^7.0", + "symfony/config": "^5.4 || ^6.0 || ^7.0", + "symfony/console": "^5.4 || ^6.0 || ^7.0", + "symfony/dependency-injection": "^5.4 || ^6.0 || ^7.0", "symfony/deprecation-contracts": "^2.1 || ^3", - "symfony/doctrine-bridge": "^5.4.19 || ^6.0.7", - "symfony/framework-bundle": "^5.4 || ^6.0", + "symfony/doctrine-bridge": "^5.4.19 || ^6.0.7 || ^7.0", + "symfony/framework-bundle": "^5.4 || ^6.0 || ^7.0", "symfony/service-contracts": "^1.1.1 || ^2.0 || ^3" }, "require-dev": { @@ -53,16 +53,16 @@ "psalm/plugin-phpunit": "^0.18.4", "psalm/plugin-symfony": "^4", "psr/log": "^1.1.4 || ^2.0 || ^3.0", - "symfony/phpunit-bridge": "^6.1", - "symfony/property-info": "^5.4 || ^6.0", - "symfony/proxy-manager-bridge": "^5.4 || ^6.0", - "symfony/security-bundle": "^5.4 || ^6.0", - "symfony/string": "^5.4 || ^6.0", - "symfony/twig-bridge": "^5.4 || ^6.0", - "symfony/validator": "^5.4 || ^6.0", + "symfony/phpunit-bridge": "^6.1 || ^7.0", + "symfony/property-info": "^5.4 || ^6.0 || ^7.0", + "symfony/proxy-manager-bridge": "^5.4 || ^6.0 || ^7.0", + "symfony/security-bundle": "^5.4 || ^6.0 || ^7.0", + "symfony/string": "^5.4 || ^6.0 || ^7.0", + "symfony/twig-bridge": "^5.4 || ^6.0 || ^7.0", + "symfony/validator": "^5.4 || ^6.0 || ^7.0", "symfony/var-exporter": "^5.4 || ^6.2 || ^7.0", - "symfony/web-profiler-bundle": "^5.4 || ^6.0", - "symfony/yaml": "^5.4 || ^6.0", + "symfony/web-profiler-bundle": "^5.4 || ^6.0 || ^7.0", + "symfony/yaml": "^5.4 || ^6.0 || ^7.0", "twig/twig": "^1.34 || ^2.12 || ^3.0", "vimeo/psalm": "^4.30" },