From 87c09e3b3d7ee0226e33730ea8bbdbeab8481ab6 Mon Sep 17 00:00:00 2001 From: Florent Morselli Date: Sun, 15 Oct 2023 13:40:15 +0200 Subject: [PATCH] Fix missing class from query --- .../src/Repository/DoctrineCredentialSourceRepository.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/symfony/src/Repository/DoctrineCredentialSourceRepository.php b/src/symfony/src/Repository/DoctrineCredentialSourceRepository.php index 7ed9615e..6083efd7 100644 --- a/src/symfony/src/Repository/DoctrineCredentialSourceRepository.php +++ b/src/symfony/src/Repository/DoctrineCredentialSourceRepository.php @@ -16,7 +16,7 @@ */ class DoctrineCredentialSourceRepository extends ServiceEntityRepository implements PublicKeyCredentialSourceRepositoryInterface, CanSaveCredentialSource { - private readonly string $class; + protected readonly string $class; /** * @param class-string $class @@ -43,6 +43,7 @@ public function findAllForUserEntity(PublicKeyCredentialUserEntity $publicKeyCre { return $this->getEntityManager() ->createQueryBuilder() + ->from($this->class, 'c') ->select('c') ->where('c.userHandle = :userHandle') ->setParameter(':userHandle', $publicKeyCredentialUserEntity->id) @@ -54,6 +55,7 @@ public function findOneByCredentialId(string $publicKeyCredentialId): ?PublicKey { return $this->getEntityManager() ->createQueryBuilder() + ->from($this->class, 'c') ->select('c') ->where('c.publicKeyCredentialId = :publicKeyCredentialId') ->setParameter(':publicKeyCredentialId', base64_encode($publicKeyCredentialId)) @@ -63,7 +65,7 @@ public function findOneByCredentialId(string $publicKeyCredentialId): ?PublicKey } /** - * @deprecated since 4.7.2 and will be removed in 5.0.0 + * @deprecated since 4.7.2 and will be removed in 5.0.0. Please use the property instead. */ protected function getClass(): string {