Skip to content

Commit

Permalink
Fix DBAL 2.12 compatibility break (#68)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremycr committed Jul 27, 2023
1 parent 3c56a90 commit e8b3625
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions src/Repository/JobRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public function findOneshotDataflows(): iterable
$qb
->andWhere($qb->expr()->isNull('scheduled_dataflow_id'))
->andWhere($qb->expr()->eq('status', $qb->createNamedParameter(Job::STATUS_PENDING, ParameterType::INTEGER)));
$stmt = $qb->executeQuery();
$stmt = $qb->execute();
if (0 === $stmt->rowCount()) {
return [];
}
Expand Down Expand Up @@ -106,7 +106,7 @@ public function findLatests(): iterable
$qb
->orderBy('requested_date', 'DESC')
->setMaxResults(20);
$stmt = $qb->executeQuery();
$stmt = $qb->execute();
if (0 === $stmt->rowCount()) {
return [];
}
Expand All @@ -121,7 +121,7 @@ public function findForScheduled(int $id): iterable
$qb->andWhere($qb->expr()->eq('scheduled_dataflow_id', $qb->createNamedParameter($id, ParameterType::INTEGER)))
->orderBy('requested_date', 'DESC')
->setMaxResults(20);
$stmt = $qb->executeQuery();
$stmt = $qb->execute();
if (0 === $stmt->rowCount()) {
return [];
}
Expand Down Expand Up @@ -162,7 +162,7 @@ public function createQueryBuilder($alias = null): QueryBuilder

private function returnFirstOrNull(QueryBuilder $qb): ?Job
{
$stmt = $qb->executeQuery();
$stmt = $qb->execute();
if (0 === $stmt->rowCount()) {
return null;
}
Expand Down
8 changes: 4 additions & 4 deletions src/Repository/ScheduledDataflowRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public function findReadyToRun(): iterable
->orderBy('next', 'ASC')
;

$stmt = $qb->executeQuery();
$stmt = $qb->execute();
if (0 === $stmt->rowCount()) {
return [];
}
Expand All @@ -74,7 +74,7 @@ public function findAllOrderedByLabel(): iterable
$qb = $this->createQueryBuilder();
$qb->orderBy('label', 'ASC');

$stmt = $qb->executeQuery();
$stmt = $qb->execute();
if (0 === $stmt->rowCount()) {
return [];
}
Expand All @@ -92,7 +92,7 @@ public function listAllOrderedByLabel(): array
->orderBy('w.label', 'ASC')
->groupBy('w.id');

return $query->executeQuery()->fetchAllAssociative();
return $query->execute()->fetchAllAssociative();
}

public function save(ScheduledDataflow $scheduledDataflow)
Expand Down Expand Up @@ -138,7 +138,7 @@ public function createQueryBuilder($alias = null): QueryBuilder

private function returnFirstOrNull(QueryBuilder $qb): ?ScheduledDataflow
{
$stmt = $qb->executeQuery();
$stmt = $qb->execute();
if (0 === $stmt->rowCount()) {
return null;
}
Expand Down

0 comments on commit e8b3625

Please sign in to comment.