From 33d6a25060a73bc0c2e53879ad23e102ec94b4fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20B=C3=B6hmer?= Date: Sat, 23 Nov 2019 17:00:16 +0100 Subject: [PATCH] Fixed an deprecation message. --- src/Repository/UserRepository.php | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/Repository/UserRepository.php b/src/Repository/UserRepository.php index 85a46004..afb89bc9 100644 --- a/src/Repository/UserRepository.php +++ b/src/Repository/UserRepository.php @@ -23,6 +23,9 @@ namespace App\Repository; use App\Entity\UserSystem\User; use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository; +use Doctrine\ORM\EntityManagerInterface; +use Doctrine\ORM\EntityRepository; +use Doctrine\ORM\Mapping; use Symfony\Bridge\Doctrine\RegistryInterface; /** @@ -31,16 +34,10 @@ use Symfony\Bridge\Doctrine\RegistryInterface; * @method User[] findAll() * @method User[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null) */ -class UserRepository extends ServiceEntityRepository +class UserRepository extends EntityRepository { protected $anonymous_user; - public function __construct(RegistryInterface $registry) - { - parent::__construct($registry, User::class); - $this->anonymous_user = null; - } - /** * Returns the anonymous user. * The result is cached, so the database is only called once, after the anonymous user was found.