From e585f2e198180329ff210b88e7a14644f3d4dcdd Mon Sep 17 00:00:00 2001 From: Carl Schwan Date: Mon, 15 Dec 2025 17:33:15 +0100 Subject: [PATCH 1/3] fix(background-jobs): Fix unit tests with 32-bits tests Signed-off-by: Carl Schwan --- lib/private/BackgroundJob/JobList.php | 4 ++-- tests/lib/BackgroundJob/JobListTest.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/private/BackgroundJob/JobList.php b/lib/private/BackgroundJob/JobList.php index 846c75626384f..a808c8231b160 100644 --- a/lib/private/BackgroundJob/JobList.php +++ b/lib/private/BackgroundJob/JobList.php @@ -289,7 +289,7 @@ public function getDetailsById(string $id): ?array { $query = $this->connection->getQueryBuilder(); $query->select('*') ->from('jobs') - ->where($query->expr()->eq('id', $query->createNamedParameter($id, IQueryBuilder::PARAM_INT))); + ->where($query->expr()->eq('id', $query->createNamedParameter($id))); $result = $query->executeQuery(); $row = $result->fetch(); $result->closeCursor(); @@ -361,7 +361,7 @@ public function setLastRun(IJob $job): void { $query = $this->connection->getQueryBuilder(); $query->update('jobs') ->set('last_run', $query->createNamedParameter(time(), IQueryBuilder::PARAM_INT)) - ->where($query->expr()->eq('id', $query->createNamedParameter($job->getId(), IQueryBuilder::PARAM_INT))); + ->where($query->expr()->eq('id', $query->createNamedParameter($job->getId()))); if ($job instanceof \OCP\BackgroundJob\TimedJob && !$job->isTimeSensitive()) { diff --git a/tests/lib/BackgroundJob/JobListTest.php b/tests/lib/BackgroundJob/JobListTest.php index ae3046f9b3c62..4314bb19aa645 100644 --- a/tests/lib/BackgroundJob/JobListTest.php +++ b/tests/lib/BackgroundJob/JobListTest.php @@ -151,7 +151,7 @@ protected function createTempJob($class, $query = $this->connection->getQueryBuilder(); $query->insert('jobs') ->values([ - 'id' => $query->createNamedParameter($id, IQueryBuilder::PARAM_INT), + 'id' => $query->createNamedParameter($id), 'class' => $query->createNamedParameter($class), 'argument' => $query->createNamedParameter($argument), 'last_run' => $query->createNamedParameter($lastRun, IQueryBuilder::PARAM_INT), From 492e9e5fd1c862d3ddbe3b3271629563495858a8 Mon Sep 17 00:00:00 2001 From: Ferdinand Thiessen Date: Mon, 15 Dec 2025 17:54:18 +0100 Subject: [PATCH 2/3] ci: run 32bit tests on lib changes Signed-off-by: Ferdinand Thiessen --- .github/workflows/phpunit-32bits.yml | 30 +++++++++++++++++++++------- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/.github/workflows/phpunit-32bits.yml b/.github/workflows/phpunit-32bits.yml index 5b8f2626272ac..b938210cb9672 100644 --- a/.github/workflows/phpunit-32bits.yml +++ b/.github/workflows/phpunit-32bits.yml @@ -4,12 +4,6 @@ name: PHPUnit 32bits on: pull_request: - paths: - - "version.php" - - ".github/workflows/phpunit-32bits.yml" - - "tests/phpunit-autotest.xml" - - "lib/private/Snowflake/*" - workflow_dispatch: schedule: - cron: "15 1 * * 1-6" @@ -21,10 +15,32 @@ concurrency: cancel-in-progress: true jobs: + changes: + runs-on: ubuntu-latest-low + permissions: + contents: read + pull-requests: read + + outputs: + src: ${{ steps.changes.outputs.src}} + + steps: + - uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 + id: changes + continue-on-error: true + with: + filters: | + src: + - '.github/workflows/phpunit-32bits.yml' + - '3rdparty/**' + - '**/lib/**' + - '**.php' + phpunit-32bits: runs-on: ubuntu-latest - if: ${{ github.repository_owner != 'nextcloud-gmbh' }} + needs: changes + if: needs.changes.outputs.src != 'false' strategy: fail-fast: false From 1c45cb2c6eeacf3287c0b665a8cbb366f6f30cbd Mon Sep 17 00:00:00 2001 From: Carl Schwan Date: Tue, 16 Dec 2025 10:11:09 +0100 Subject: [PATCH 3/3] fix(birthday-service): Fix on 32 bits system Signed-off-by: Carl Schwan --- apps/dav/lib/CalDAV/BirthdayService.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/dav/lib/CalDAV/BirthdayService.php b/apps/dav/lib/CalDAV/BirthdayService.php index 6f390677379f1..06c5e9c78ccb5 100644 --- a/apps/dav/lib/CalDAV/BirthdayService.php +++ b/apps/dav/lib/CalDAV/BirthdayService.php @@ -217,7 +217,7 @@ public function buildDateFromContact(string $cardData, $vEvent->DTSTART['VALUE'] = 'DATE'; $vEvent->add('DTEND'); - $dtEndDate = (new \DateTime())->setTimestamp($date->getTimeStamp()); + $dtEndDate = \DateTime::createFromInterface($date); $dtEndDate->add(new \DateInterval('P1D')); $vEvent->DTEND->setDateTime( $dtEndDate