Fixed an deprecation message.

This commit is contained in:
Jan Böhmer 2019-11-23 17:00:16 +01:00
parent fa4f3aadd6
commit 33d6a25060

View file

@ -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.