From 729110905084577831593ba2e14b8c4dff676a24 Mon Sep 17 00:00:00 2001 From: Carl Schwan Date: Mon, 13 Oct 2025 16:38:33 +0200 Subject: [PATCH 1/2] refactor(QueryBuilder): Port away from deprecated execute method Signed-off-by: Carl Schwan --- lib/Command/PreGenerate.php | 4 ++-- lib/Listeners/PostWriteListener.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/Command/PreGenerate.php b/lib/Command/PreGenerate.php index 6c485fb..90d5aa7 100644 --- a/lib/Command/PreGenerate.php +++ b/lib/Command/PreGenerate.php @@ -117,7 +117,7 @@ private function startProcessing(): void { ->from('preview_generation') ->orderBy('id') ->setMaxResults(1000); - $cursor = $qb->execute(); + $cursor = $qb->executeQuery(); $rows = $cursor->fetchAll(); $cursor->closeCursor(); @@ -133,7 +133,7 @@ private function startProcessing(): void { $qb = $this->connection->getQueryBuilder(); $qb->delete('preview_generation') ->where($qb->expr()->eq('id', $qb->createNamedParameter($row['id']))); - $qb->execute(); + $qb->executeStatement(); $this->processRow($row); } diff --git a/lib/Listeners/PostWriteListener.php b/lib/Listeners/PostWriteListener.php index 0c22061..bf0f2a0 100644 --- a/lib/Listeners/PostWriteListener.php +++ b/lib/Listeners/PostWriteListener.php @@ -48,7 +48,7 @@ public function handle(Event $event): void { $qb->expr()->eq('file_id', $qb->createNamedParameter($node->getId())) ) )->setMaxResults(1); - $cursor = $qb->execute(); + $cursor = $qb->executeQuery(); $inTable = $cursor->fetch() !== false; $cursor->closeCursor(); @@ -61,6 +61,6 @@ public function handle(Event $event): void { $qb->insert('preview_generation') ->setValue('uid', $qb->createNamedParameter($owner)) ->setValue('file_id', $qb->createNamedParameter($node->getId())); - $qb->execute(); + $qb->executeStatement(); } } From 7311f3dd849a720c96772f2d22a0d52c1f9e93db Mon Sep 17 00:00:00 2001 From: Richard Steinmetz Date: Tue, 14 Oct 2025 12:43:10 +0200 Subject: [PATCH 2/2] ci(lint-php-cs): install minimum supported version of PHP Signed-off-by: Richard Steinmetz --- .github/workflows/lint-php-cs.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/lint-php-cs.yml b/.github/workflows/lint-php-cs.yml index 51d863a..d91732d 100644 --- a/.github/workflows/lint-php-cs.yml +++ b/.github/workflows/lint-php-cs.yml @@ -31,10 +31,10 @@ jobs: id: versions uses: icewind1991/nextcloud-version-matrix@58becf3b4bb6dc6cef677b15e2fd8e7d48c0908f # v1.3.1 - - name: Set up php${{ steps.versions.outputs.php-available }} + - name: Set up php${{ steps.versions.outputs.php-min }} uses: shivammathur/setup-php@bf6b4fbd49ca58e4608c9c89fba0b8d90bd2a39f # v2.35.5 with: - php-version: ${{ steps.versions.outputs.php-available }} + php-version: ${{ steps.versions.outputs.php-min }} extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite coverage: none ini-file: development