Skip to content

Commit 8207b80

Browse files
committed
changed the base class for Doctrine repositories
1 parent a99c3f6 commit 8207b80

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/Resources/skeleton/doctrine/Repository.php.txt

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,16 @@
22

33
namespace App\Repository;
44

5-
use Doctrine\ORM\EntityRepository;
5+
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
66
use Doctrine\ORM\Query;
77

8-
class {{ repository_class_name }} extends EntityRepository
8+
class {{ repository_class_name }} extends ServiceEntityRepository
99
{
10+
public function __construct(RegistryInterface $registry)
11+
{
12+
parent::__construct($registry, {{ repository_class_name }}::class);
13+
}
14+
1015
/*
1116
public function findBySomething($value)
1217
{

0 commit comments

Comments
 (0)