From 3a7b796e8c6b89ad13ec171cce447538879f5481 Mon Sep 17 00:00:00 2001 From: Michael Stilkerich Date: Sat, 23 Mar 2024 19:35:17 +0100 Subject: [PATCH] Upgrade github actions to node 20 --- .github/workflows/ci.yml | 18 +++++++++--------- composer.json | 2 +- src/Addressbook.php | 4 ---- src/Frontend/AdminSettings.php | 2 ++ 4 files changed, 12 insertions(+), 14 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b01cdf07..1b4cd965 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,7 +18,7 @@ jobs: steps: - name: Checkout rcmcarddav - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up CI environment uses: ./.github/actions/setup with: @@ -45,7 +45,7 @@ jobs: steps: - name: Checkout rcmcarddav - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up CI environment uses: ./.github/actions/setup with: @@ -53,7 +53,7 @@ jobs: - name: Run unit tests run: make unittests - name: Upload unit test coverage reports to codecov.io - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v4 with: files: testreports/unit/clover.xml flags: unittests @@ -67,13 +67,13 @@ jobs: steps: - name: Checkout rcmcarddav - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up CI environment uses: ./.github/actions/setup - name: Database interoperability tests for SQLite3 run: make tests-sqlite3 - name: Upload DB interoperability test coverage reports to codecov.io - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v4 with: files: testreports/dbinterop-sqlite3/clover.xml flags: dbinterop-sqlite3 @@ -119,7 +119,7 @@ jobs: steps: - name: Checkout rcmcarddav - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up CI environment uses: ./.github/actions/setup - name: Set MySQL settings @@ -128,7 +128,7 @@ jobs: - name: Database interoperability tests for MySQL run: make tests-mysql - name: Upload DB interoperability test coverage reports to codecov.io - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v4 with: files: testreports/dbinterop-mysql/clover.xml flags: dbinterop-mysql @@ -164,13 +164,13 @@ jobs: steps: - name: Checkout rcmcarddav - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up CI environment uses: ./.github/actions/setup - name: Database interoperability tests for Postgres run: make tests-postgres - name: Upload DB interoperability test coverage reports to codecov.io - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v4 with: files: testreports/dbinterop-postgres/clover.xml flags: dbinterop-postgres diff --git a/composer.json b/composer.json index a432a4fa..ea38a214 100644 --- a/composer.json +++ b/composer.json @@ -33,7 +33,7 @@ "dealerdirect/phpcodesniffer-composer-installer": ">= 0.7.0", "phpunit/phpunit": "~9", "phpunit/phpcov": "*", - "vimeo/psalm": "~5.15.0", + "vimeo/psalm": "~5.18.0", "psalm/plugin-phpunit": "*", "aodto/phasher": "dev-master" }, diff --git a/src/Addressbook.php b/src/Addressbook.php index 868062fe..46833a31 100644 --- a/src/Addressbook.php +++ b/src/Addressbook.php @@ -1062,7 +1062,6 @@ public function add_to_group($group_id, $ids): int $ids, // unfiltered ids allowed in adjustContactCategories() /** @param list $groups */ function (array &$groups, string $contact_id) use ($logger, $groupname, &$added): bool { - /** @var int $added */ if (self::stringsAddRemove($groups, [ $groupname ])) { $logger->debug("Adding contact $contact_id to category $groupname"); ++$added; @@ -1073,7 +1072,6 @@ function (array &$groups, string $contact_id) use ($logger, $groupname, &$added) return false; } ); - /** @var int $added Reference from the closure appears to confuse psalm */ } $this->resync(); @@ -1140,7 +1138,6 @@ public function remove_from_group($group_id, $ids): int $ids, // unfiltered ids allowed in adjustContactCategories() /** @param list $groups */ function (array &$groups, string $contact_id) use ($logger, $groupname, &$deleted): bool { - /** @var int $deleted */ if (self::stringsAddRemove($groups, [], [$groupname])) { $logger->debug("Removing contact $contact_id from category $groupname"); ++$deleted; @@ -1151,7 +1148,6 @@ function (array &$groups, string $contact_id) use ($logger, $groupname, &$delete return false; } ); - /** @psalm-var int $deleted Reference from the closure appears to confuse psalm */ } $this->resync(); diff --git a/src/Frontend/AdminSettings.php b/src/Frontend/AdminSettings.php index b657544b..856687eb 100644 --- a/src/Frontend/AdminSettings.php +++ b/src/Frontend/AdminSettings.php @@ -481,6 +481,7 @@ private function updatePresetAddressbook( $account = Config::makeAccount($accountCfg); $abook = $infra->makeWebDavResource($abookCfg['url'], $account); if ($abook instanceof AddressbookCollection) { + /** @psalm-var Preset $preset */ $preset['name'] = $abMgr->replacePlaceholdersAbookName( $preset['name'], $accountCfg, @@ -491,6 +492,7 @@ private function updatePresetAddressbook( } } + /** @psalm-var Preset $preset */ if ($abookCfg[$k] != $preset[$k]) { $pa[$k] = $preset[$k]; }