From e8b362526a083bf35805ac8d2a01d31bbc8554af Mon Sep 17 00:00:00 2001 From: jeremycr <32451794+jeremycr@users.noreply.github.com> Date: Thu, 27 Jul 2023 16:47:50 +0200 Subject: [PATCH] Fix DBAL 2.12 compatibility break (#68) --- src/Repository/JobRepository.php | 8 ++++---- src/Repository/ScheduledDataflowRepository.php | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/Repository/JobRepository.php b/src/Repository/JobRepository.php index ce86ec9..b49cd52 100644 --- a/src/Repository/JobRepository.php +++ b/src/Repository/JobRepository.php @@ -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 []; } @@ -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 []; } @@ -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 []; } @@ -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; } diff --git a/src/Repository/ScheduledDataflowRepository.php b/src/Repository/ScheduledDataflowRepository.php index ff0cff4..af05086 100644 --- a/src/Repository/ScheduledDataflowRepository.php +++ b/src/Repository/ScheduledDataflowRepository.php @@ -50,7 +50,7 @@ public function findReadyToRun(): iterable ->orderBy('next', 'ASC') ; - $stmt = $qb->executeQuery(); + $stmt = $qb->execute(); if (0 === $stmt->rowCount()) { return []; } @@ -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 []; } @@ -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) @@ -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; }