From 2d1895bb10b783f97536bd6fc939937280660730 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Tamarelle?= Date: Thu, 18 Dec 2025 13:22:20 +0100 Subject: [PATCH] PHPLIB-1752 Upgrade to psalm 6.14 --- .github/workflows/static-analysis.yml | 2 +- composer.json | 2 +- psalm-baseline.xml | 17 ++++++++++------- psalm.xml.dist | 3 +++ src/Client.php | 1 + src/Database.php | 1 + 6 files changed, 17 insertions(+), 9 deletions(-) diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml index 2ea0eeb13..00db2b644 100644 --- a/.github/workflows/static-analysis.yml +++ b/.github/workflows/static-analysis.yml @@ -18,7 +18,7 @@ on: required: true env: - PHP_VERSION: "8.2" + PHP_VERSION: "8.5" # TODO: change to "stable" once 2.0.0 is released # DRIVER_VERSION: "stable" DRIVER_VERSION: "mongodb/mongo-php-driver@v2.x" diff --git a/composer.json b/composer.json index 285255e48..b2f7c968d 100644 --- a/composer.json +++ b/composer.json @@ -21,7 +21,7 @@ "phpunit/phpunit": "^10.5.35", "rector/rector": "^2.1.4", "squizlabs/php_codesniffer": "^3.7", - "vimeo/psalm": "6.5.*" + "vimeo/psalm": "~6.14.2" }, "replace": { "mongodb/builder": "*" diff --git a/psalm-baseline.xml b/psalm-baseline.xml index 4d99d5c0c..6fd250111 100644 --- a/psalm-baseline.xml +++ b/psalm-baseline.xml @@ -1,5 +1,5 @@ - + @@ -23,6 +23,11 @@ + + + + + + + + + @@ -388,9 +397,6 @@ ]]> - - ]]> - cursor->nextBatch]]> @@ -559,9 +565,6 @@ - - executeBulkWriteCommand($this->bulkWriteCommand, $options)]]> - diff --git a/psalm.xml.dist b/psalm.xml.dist index 28efbec86..0744d9c37 100644 --- a/psalm.xml.dist +++ b/psalm.xml.dist @@ -45,5 +45,8 @@ + + + diff --git a/src/Client.php b/src/Client.php index 938da2f1a..2d7684d3a 100644 --- a/src/Client.php +++ b/src/Client.php @@ -54,6 +54,7 @@ use function is_array; use function is_string; +/** @psalm-no-seal-properties */ class Client implements Stringable { public const DEFAULT_URI = 'mongodb://127.0.0.1/'; diff --git a/src/Database.php b/src/Database.php index be5803e34..d0524d377 100644 --- a/src/Database.php +++ b/src/Database.php @@ -58,6 +58,7 @@ use function is_bool; use function strlen; +/** @psalm-no-seal-properties */ class Database implements Stringable { private const DEFAULT_TYPE_MAP = [