1
0
Fork 0
mirror of https://github.com/wallabag/wallabag.git synced 2025-08-06 17:41:01 +00:00

Make repositories use ServiceEntityRepository

This commit is contained in:
Yassine Guedidi 2022-08-27 23:01:09 +02:00
parent 51884911f5
commit 1bee0eeb29
11 changed files with 95 additions and 42 deletions

View file

@ -2,10 +2,17 @@
namespace Wallabag\ApiBundle\Repository;
use Doctrine\ORM\EntityRepository;
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
use Doctrine\Persistence\ManagerRegistry;
use Wallabag\ApiBundle\Entity\Client;
class ClientRepository extends EntityRepository
class ClientRepository extends ServiceEntityRepository
{
public function __construct(ManagerRegistry $registry)
{
parent::__construct($registry, Client::class);
}
public function findOneBy(array $criteria, array $orderBy = null)
{
if (!empty($criteria['id'])) {