Skip to content

Commit

Permalink
Merge pull request #331 from Tim-Obert/master
Browse files Browse the repository at this point in the history
Fix deprecation warnings of QueryBuilder::execute()
  • Loading branch information
fsuter authored Jun 27, 2024
2 parents 2354c68 + ef1c856 commit 57c1114
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions Classes/Domain/Repository/ChildrenRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public function findAllExistingRecords(string $table, array $conditions): array
{
$existingRecords = [];
$queryBuilder = $this->prepareQueryBuilder($table, $conditions);
$result = $queryBuilder->execute();
$result = $queryBuilder->executeQuery();
while ($record = $result->fetch()) {
$existingRecords[] = $record['uid'];
}
Expand All @@ -60,7 +60,7 @@ public function findAllExistingRecords(string $table, array $conditions): array
public function findFirstExistingRecord(string $table, array $conditions): int
{
$queryBuilder = $this->prepareQueryBuilder($table, $conditions);
$result = $queryBuilder->execute();
$result = $queryBuilder->executeQuery();
$record = $result->fetchAssociative();
if ($record) {
return (int)$record['uid'];
Expand Down
2 changes: 1 addition & 1 deletion Classes/Domain/Repository/SchedulerRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ public function fetchAllGroups(): array
$rows = $queryBuilder->select('uid', 'groupName')
->from('tx_scheduler_task_group')
->orderBy('groupName')
->execute();
->executeQuery();
while ($row = $rows->fetchAssociative()) {
$groups[$row['uid']] = $row['groupName'];
}
Expand Down
2 changes: 1 addition & 1 deletion Classes/Domain/Repository/UidRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ protected function retrieveExistingUids(): void
if (count($constraints) > 0) {
$queryBuilder->where(...$constraints);
}
$result = $queryBuilder->execute();
$result = $queryBuilder->executeQuery();
if ($result) {
while ($row = $result->fetchAssociative()) {
// Don't consider records with empty references, as they can't be matched
Expand Down
2 changes: 1 addition & 1 deletion Classes/Step/StoreDataStep.php
Original file line number Diff line number Diff line change
Expand Up @@ -1039,7 +1039,7 @@ protected function reportTceErrors(array $errorLog): void
->setMaxResults(
count($errorLog)
)
->execute();
->executeQuery();
if ($result) {
while ($row = $result->fetchAssociative()) {
// Check if there's a label for the message
Expand Down
2 changes: 1 addition & 1 deletion Classes/Utility/MappingUtility.php
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ public function getMapping(array $mappingData): array
$result = $queryBuilder->selectLiteral($referenceField, $valueField)
->from($mappingData['table'])
->where($whereClause)
->execute();
->executeQuery();

// Fill hash table
if ($result) {
Expand Down
4 changes: 2 additions & 2 deletions Classes/Utility/SlugUtility.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public function updateAll(string $table, array $uids): void
->from($table)
->where(
$queryBuilder->expr()->in('uid', $uids)
)->execute()
)->executeQuery()
->fetchAllAssociative();
// Generate the new slug for each record
$newSlugs = [];
Expand All @@ -78,7 +78,7 @@ public function updateAll(string $table, array $uids): void
->set($field, $slug)
->where(
$queryBuilder->expr()->eq('uid', $record['uid'])
)->execute();
)->executeStatement();
}
}
}
Expand Down

0 comments on commit 57c1114

Please sign in to comment.