From 5d94ca9030a4c1a6bec4214d29fd62f600a8f71a Mon Sep 17 00:00:00 2001 From: David Buchmann Date: Sat, 6 Apr 2024 10:17:32 +0200 Subject: [PATCH] remove workarounds for symfony 5 --- composer.json | 2 +- resources/config/dist/security.php | 1 - src/Functional/BaseTestCase.php | 9 +-------- 3 files changed, 2 insertions(+), 10 deletions(-) diff --git a/composer.json b/composer.json index 7321256..dcf89e0 100644 --- a/composer.json +++ b/composer.json @@ -28,7 +28,7 @@ }, "conflict": { "doctrine/phpcr-bundle": "<3.0", - "symfony/framework-bundle": "<5.4.6" + "symfony/framework-bundle": "<6.4" }, "autoload": { "psr-4": { diff --git a/resources/config/dist/security.php b/resources/config/dist/security.php index 3008522..57d1dc1 100644 --- a/resources/config/dist/security.php +++ b/resources/config/dist/security.php @@ -40,7 +40,6 @@ ], ]; - if (class_exists(\Symfony\Component\Security\Core\Security::class)) { // Symfony 6 but not 7 $config['enable_authenticator_manager'] = true; diff --git a/src/Functional/BaseTestCase.php b/src/Functional/BaseTestCase.php index 9d7b66e..bc49390 100644 --- a/src/Functional/BaseTestCase.php +++ b/src/Functional/BaseTestCase.php @@ -143,14 +143,7 @@ protected function getDbManager(string $type) )); } - $refl = new \ReflectionClass($className); - if (1 === $refl->getConstructor()->getNumberOfParameters()) { - // phpcr-bundle < 3 - $dbManager = new $className(self::getContainer()); - } else { - // phpcr-bundle >= 3 - $dbManager = new $className(self::getContainer()->get('doctrine_phpcr'), self::getContainer()->get('doctrine_phpcr.initializer_manager')); - } + $dbManager = new $className(self::getContainer()->get('doctrine_phpcr'), self::getContainer()->get('doctrine_phpcr.initializer_manager')); $this->dbManagers[$type] = $dbManager;