Skip to content

Commit

Permalink
Drop (implicitly) support Doctrine/ORM older (< 2.4) version
Browse files Browse the repository at this point in the history
  • Loading branch information
issei-m committed Oct 10, 2017
1 parent af7da80 commit 274f6c6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions DependencyInjection/Compiler/IntegrationPass.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@ private function integrateWithDoctrine(ContainerBuilder $container)
return;
}

// Can't support Doctrine/ORM older (< 2.4) version.
$reflection = new \ReflectionClass('Doctrine\ORM\Configuration');
if (!$reflection->hasMethod('setRepositoryFactory')) {
return;
}

$entityManagerNames = array_keys($container->getParameter('doctrine.entity_managers'));

foreach ($entityManagerNames as $emName) {
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"sensio/framework-extra-bundle": "~2.0|~3.0",
"jms/security-extra-bundle": "~1.0",
"doctrine/doctrine-bundle": "~1.5",
"doctrine/orm": "~2.3",
"doctrine/orm": "~2.4",
"phpcollection/phpcollection": ">=0.2,<0.3-dev",
"symfony/phpunit-bridge": "~3.3",
"phpunit/phpunit": "^4.8.35|^5.4.4|^6.0.0",
Expand Down

0 comments on commit 274f6c6

Please sign in to comment.