Skip to content

Commit

Permalink
Merge pull request #495 from web-auth/bug/dql-missing-class
Browse files Browse the repository at this point in the history
Class is missing from the query
  • Loading branch information
Spomky committed Oct 15, 2023
2 parents d81c428 + 87c09e3 commit 474cc11
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/
class DoctrineCredentialSourceRepository extends ServiceEntityRepository implements PublicKeyCredentialSourceRepositoryInterface, CanSaveCredentialSource
{
private readonly string $class;
protected readonly string $class;

/**
* @param class-string<T> $class
Expand All @@ -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)
Expand All @@ -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))
Expand All @@ -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
{
Expand Down

0 comments on commit 474cc11

Please sign in to comment.