Skip to content

Commit

Permalink
Merge pull request #928 from rosier/drop-bc-layer
Browse files Browse the repository at this point in the history
Drop support for Symfony < 3.4
  • Loading branch information
alcaeus committed Apr 2, 2019
2 parents 3597c27 + 3b19381 commit ab34380
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions Registry.php
Expand Up @@ -6,10 +6,9 @@
use Doctrine\ORM\EntityManager;
use Doctrine\ORM\EntityManagerInterface;
use Doctrine\ORM\ORMException;
use Psr\Container\ContainerInterface;
use Symfony\Bridge\Doctrine\ManagerRegistry;
use Symfony\Bridge\Doctrine\RegistryInterface;
use Symfony\Component\DependencyInjection\ContainerAwareTrait;
use Symfony\Component\DependencyInjection\ContainerInterface;

/**
* References all Doctrine connections and entity managers in a given Container.
Expand All @@ -24,14 +23,7 @@ class Registry extends ManagerRegistry implements RegistryInterface
*/
public function __construct(ContainerInterface $container, array $connections, array $entityManagers, $defaultConnection, $defaultEntityManager)
{
$parentTraits = class_uses(parent::class);
if (isset($parentTraits[ContainerAwareTrait::class])) {
// this case should be removed when Symfony 3.4 becomes the lowest supported version
// and then also, the constructor should type-hint Psr\Container\ContainerInterface
$this->setContainer($container);
} else {
$this->container = $container;
}
$this->container = $container;

parent::__construct('ORM', $connections, $entityManagers, $defaultConnection, $defaultEntityManager, 'Doctrine\ORM\Proxy\Proxy');
}
Expand Down

0 comments on commit ab34380

Please sign in to comment.