class TestRepository1
{
/**
* @var ObjectRepository
*/
private $repository;
/**
* @var EntityManagerInterface
*/
private $em;
public function __construct(EntityManagerInterface $em)
{
$this->repository = $em->getRepository(Test::class);
$this->em = $em;
}
}
class TestRepository2
{
/**
* @var ObjectRepository
*/
private $repository;
/**
* @var EntityManagerInterface
*/
private $em;
public function __construct(EntityManagerInterface $em)
{
$this->repository = $em->getRepository(Test::class);
$this->em = $em;
}
}