Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop support for Symfony < 3.4 #928

Merged
merged 1 commit into from Apr 2, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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