Skip to content

Commit

Permalink
remove workarounds for symfony 5
Browse files Browse the repository at this point in the history
  • Loading branch information
dbu committed Apr 6, 2024
1 parent af24cbb commit e493866
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 10 deletions.
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,9 @@
"symfony/phpunit-bridge": "^7.0.3"
},
"conflict": {
"doctrine/phpcr-odm": "<2.0",
"doctrine/phpcr-bundle": "<3.0",
"symfony/framework-bundle": "<5.4.6"
"symfony/framework-bundle": "<6.4"
},
"autoload": {
"psr-4": {
Expand Down
1 change: 0 additions & 1 deletion resources/config/dist/security.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
],
];


if (class_exists(\Symfony\Component\Security\Core\Security::class)) {
// Symfony 6 but not 7
$config['enable_authenticator_manager'] = true;
Expand Down
9 changes: 1 addition & 8 deletions src/Functional/BaseTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -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());

$this->dbManagers[$type] = $dbManager;

Expand Down

0 comments on commit e493866

Please sign in to comment.