Skip to content

Commit

Permalink
refactor: rename GenericEntityRepository::createQueryBuilder to creat…
Browse files Browse the repository at this point in the history
…eQueryBuilderWithOrdered
  • Loading branch information
siganushka committed Dec 2, 2024
1 parent be42bf8 commit 490cba1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Repository/GenericEntityRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public function __construct(ManagerRegistry $registry, string $entityClass)
parent::__construct($manager, $manager->getClassMetadata($entityClass));
}

public function createQueryBuilder(string $alias, ?string $indexBy = null): QueryBuilder
public function createQueryBuilderWithOrdered(string $alias, ?string $indexBy = null): QueryBuilder
{
$queryBuilder = parent::createQueryBuilder($alias, $indexBy);

Expand Down
2 changes: 1 addition & 1 deletion tests/Repository/GenericEntityRepositoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public function testAll(): void

static::assertSame(
'SELECT f FROM Siganushka\GenericBundle\Tests\Repository\Foo f ORDER BY f.sort DESC, f.createdAt DESC, f.id DESC',
$repository->createQueryBuilder('f')->getDQL()
$repository->createQueryBuilderWithOrdered('f')->getDQL()
);
}

Expand Down

0 comments on commit 490cba1

Please sign in to comment.