From e6e83e48b204c4e9f70f77b2e3d3e51bf28eb706 Mon Sep 17 00:00:00 2001 From: Daniel Kesselberg Date: Wed, 19 Aug 2026 23:00:42 +0200 Subject: [PATCH] chore: Update psalm to v6.16.0 Assisted-by: ClaudeCode:claude-opus-5 Signed-off-by: Daniel Kesselberg --- composer.json | 7 +- composer.lock | 199 ++++++++++++++++-- psalm.xml | 3 +- tests/psalm-baseline.xml | 103 +-------- vendor-bin/psalm-stubs/composer.json | 5 - vendor-bin/psalm/composer.json | 6 + .../{psalm-stubs => psalm}/composer.lock | 43 +++- 7 files changed, 234 insertions(+), 132 deletions(-) delete mode 100644 vendor-bin/psalm-stubs/composer.json create mode 100644 vendor-bin/psalm/composer.json rename vendor-bin/{psalm-stubs => psalm}/composer.lock (60%) diff --git a/composer.json b/composer.json index 10597c3163..b57c43d5ad 100644 --- a/composer.json +++ b/composer.json @@ -51,7 +51,7 @@ "psr/log": "^1.0.4|^2|^3" }, "require-dev": { - "psalm/phar": "^5.26.1", + "nextcloud/ocp": "dev-stable32", "roave/security-advisories": "dev-master" }, "autoload": { @@ -71,8 +71,9 @@ ], "lint-8.2-or-earlier": "[ $(php -r \"echo PHP_VERSION_ID;\") -ge 80300 ] || find . -type f -name '*.php' -not -path './vendor/*' -not -path './vendor-bin/*' -not -path './tests/stubs/*' -print0 | xargs -0 -n1 -P$(nproc) php -l", "lint-8.3-or-later": "[ $(php -r \"echo PHP_VERSION_ID;\") -lt 80300 ] || find . -type f -name '*.php' -not -path './vendor/*' -not -path './vendor-bin/*' -not -path './tests/stubs/*' -print0 | xargs -0 -n200 -P$(nproc) php -l", - "psalm": "psalm.phar", - "psalm:fix": "psalm.phar --alter --issues=InvalidReturnType,InvalidNullableReturnType,MismatchingDocblockParamType,MismatchingDocblockReturnType,MissingParamType,InvalidFalsableReturnType", + "psalm": "vendor-bin/psalm/vendor/psalm/phar/psalm.phar --threads=1", + "psalm:clear": "vendor-bin/psalm/vendor/psalm/phar/psalm.phar --clear-cache && vendor-bin/psalm/vendor/psalm/phar/psalm.phar --clear-cache --clear-global-cache", + "psalm:update-baseline": "vendor-bin/psalm/vendor/psalm/phar/psalm.phar --threads=1 --update-baseline --set-baseline=tests/psalm-baseline.xml", "post-install-cmd": [ "@composer bin all install --ansi", "\"vendor/bin/mozart\" compose", diff --git a/composer.lock b/composer.lock index 61f7751ba2..8f31221145 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "e8c6b7d4f4a52f473d50141c85ed0e6c", + "content-hash": "d1bd50dabba2f907fb223590c998c2ee", "packages": [ { "name": "amphp/amp", @@ -3751,39 +3751,203 @@ ], "packages-dev": [ { - "name": "psalm/phar", - "version": "5.26.1", + "name": "nextcloud/ocp", + "version": "dev-stable32", "source": { "type": "git", - "url": "https://github.com/psalm/phar.git", - "reference": "8a38e7ad04499a0ccd2c506fd1da6fc01fff4547" + "url": "https://github.com/nextcloud-deps/ocp.git", + "reference": "69c9d06aa3e899dfb74d6c035951dbc7613f2649" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/psalm/phar/zipball/8a38e7ad04499a0ccd2c506fd1da6fc01fff4547", - "reference": "8a38e7ad04499a0ccd2c506fd1da6fc01fff4547", + "url": "https://api.github.com/repos/nextcloud-deps/ocp/zipball/69c9d06aa3e899dfb74d6c035951dbc7613f2649", + "reference": "69c9d06aa3e899dfb74d6c035951dbc7613f2649", "shasum": "" }, "require": { - "php": "^7.1 || ^8.0" + "php": "~8.1 || ~8.2 || ~8.3 || ~8.4", + "psr/clock": "^1.0", + "psr/container": "^2.0.2", + "psr/event-dispatcher": "^1.0", + "psr/log": "^3.0.2" }, - "conflict": { - "vimeo/psalm": "*" + "type": "library", + "extra": { + "branch-alias": { + "dev-stable32": "32.0.0-dev" + } }, - "bin": [ - "psalm.phar" + "notification-url": "https://packagist.org/downloads/", + "license": [ + "AGPL-3.0-or-later" + ], + "authors": [ + { + "name": "Christoph Wurst", + "email": "christoph@winzerhof-wurst.at" + }, + { + "name": "Joas Schilling", + "email": "coding@schilljs.com" + } ], + "description": "Composer package containing Nextcloud's public OCP API and the unstable NCU API", + "support": { + "issues": "https://github.com/nextcloud-deps/ocp/issues", + "source": "https://github.com/nextcloud-deps/ocp/tree/stable32" + }, + "time": "2026-08-07T02:03:41+00:00" + }, + { + "name": "psr/clock", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/clock.git", + "reference": "e41a24703d4560fd0acb709162f73b8adfc3aa0d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/clock/zipball/e41a24703d4560fd0acb709162f73b8adfc3aa0d", + "reference": "e41a24703d4560fd0acb709162f73b8adfc3aa0d", + "shasum": "" + }, + "require": { + "php": "^7.0 || ^8.0" + }, "type": "library", + "autoload": { + "psr-4": { + "Psr\\Clock\\": "src/" + } + }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], - "description": "Composer-based Psalm Phar", + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for reading the clock.", + "homepage": "https://github.com/php-fig/clock", + "keywords": [ + "clock", + "now", + "psr", + "psr-20", + "time" + ], + "support": { + "issues": "https://github.com/php-fig/clock/issues", + "source": "https://github.com/php-fig/clock/tree/1.0.0" + }, + "time": "2022-11-25T14:36:26+00:00" + }, + { + "name": "psr/container", + "version": "2.0.2", + "source": { + "type": "git", + "url": "https://github.com/php-fig/container.git", + "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/container/zipball/c71ecc56dfe541dbd90c5360474fbc405f8d5963", + "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963", + "shasum": "" + }, + "require": { + "php": ">=7.4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Container\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common Container Interface (PHP FIG PSR-11)", + "homepage": "https://github.com/php-fig/container", + "keywords": [ + "PSR-11", + "container", + "container-interface", + "container-interop", + "psr" + ], + "support": { + "issues": "https://github.com/php-fig/container/issues", + "source": "https://github.com/php-fig/container/tree/2.0.2" + }, + "time": "2021-11-05T16:47:00+00:00" + }, + { + "name": "psr/event-dispatcher", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/event-dispatcher.git", + "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/event-dispatcher/zipball/dbefd12671e8a14ec7f180cab83036ed26714bb0", + "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0", + "shasum": "" + }, + "require": { + "php": ">=7.2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\EventDispatcher\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Standard interfaces for event handling.", + "keywords": [ + "events", + "psr", + "psr-14" + ], "support": { - "issues": "https://github.com/psalm/phar/issues", - "source": "https://github.com/psalm/phar/tree/5.26.1" + "issues": "https://github.com/php-fig/event-dispatcher/issues", + "source": "https://github.com/php-fig/event-dispatcher/tree/1.0.0" }, - "time": "2024-09-09T16:22:43+00:00" + "time": "2019-01-08T18:20:26+00:00" }, { "name": "roave/security-advisories", @@ -4361,6 +4525,7 @@ "minimum-stability": "stable", "stability-flags": { "gravatarphp/gravatar": 20, + "nextcloud/ocp": 20, "roave/security-advisories": 20 }, "prefer-stable": false, @@ -4373,5 +4538,5 @@ "platform-overrides": { "php": "8.1" }, - "plugin-api-version": "2.6.0" + "plugin-api-version": "2.9.0" } diff --git a/psalm.xml b/psalm.xml index a87b8ac17d..6c074f8e1b 100644 --- a/psalm.xml +++ b/psalm.xml @@ -11,6 +11,7 @@ xsi:schemaLocation="https://getpsalm.org/schema/config" errorBaseline="tests/psalm-baseline.xml" phpVersion="8.1" + findUnusedCode="false" > @@ -22,7 +23,7 @@ - + diff --git a/tests/psalm-baseline.xml b/tests/psalm-baseline.xml index 3ab4368a80..6751fba232 100644 --- a/tests/psalm-baseline.xml +++ b/tests/psalm-baseline.xml @@ -1,23 +1,10 @@ - + - - - _data[$mailbox]]]> - _data[$mailbox]]]> - _data[$mbox]]]> - _data[$mailbox]]]> - _slicemap[$mailbox]]]> - _slicemap[$mailbox]]]> - _slicemap[$mailbox]['s']]]> - _slicemap[$mbox]]]> - _slicemap[$mailbox]]]> - - @@ -41,19 +28,6 @@ getRecipients()]]> - - - getRecipients()]]> - - - - - - - - - - getReferences()]]> @@ -67,10 +41,6 @@ getPreviewText()]]> getLabel()]]> - - - - @@ -83,11 +53,6 @@ - - - - - - - - - - @@ -220,11 +180,6 @@ getMessageId()]]> - - - toIPv4() ?? $parsedIp]]> - - getOutboundPassword()]]> @@ -235,9 +190,6 @@ getInReplyToMessageId()]]> getMyAcls()]]> - - - @@ -246,9 +198,6 @@ - - getRaw(false)]]> - @@ -325,9 +274,6 @@ - - - @@ -351,15 +297,6 @@ - - - - - - - - - getMessageId()]]> @@ -367,19 +304,9 @@ - - getRaw(false)]]> - getRaw(false)]]> - getRaw(false)]]> - getAliasId()]]> - - - - - @@ -387,23 +314,6 @@ getStart()]]> - - - - - - - - - - - - - - - - - getInboundPassword()]]> @@ -415,17 +325,6 @@ userManager->getDisplayName($user->getUID())]]> - - - flag]]> - - - flag]]> - - - - - diff --git a/vendor-bin/psalm-stubs/composer.json b/vendor-bin/psalm-stubs/composer.json deleted file mode 100644 index ef58070d0a..0000000000 --- a/vendor-bin/psalm-stubs/composer.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "require": { - "psr/log": "^3.0.2" - } -} diff --git a/vendor-bin/psalm/composer.json b/vendor-bin/psalm/composer.json new file mode 100644 index 0000000000..85fcebc235 --- /dev/null +++ b/vendor-bin/psalm/composer.json @@ -0,0 +1,6 @@ +{ + "require-dev": { + "psalm/phar": "^6.16.0", + "psr/log": "^3.0.2" + } +} diff --git a/vendor-bin/psalm-stubs/composer.lock b/vendor-bin/psalm/composer.lock similarity index 60% rename from vendor-bin/psalm-stubs/composer.lock rename to vendor-bin/psalm/composer.lock index 7c6cd79a76..848fd9212f 100644 --- a/vendor-bin/psalm-stubs/composer.lock +++ b/vendor-bin/psalm/composer.lock @@ -4,8 +4,44 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "7097590c56a243d9aec5ac9e19c8d72b", - "packages": [ + "content-hash": "930a1d197add5d4e398f8857ec653e84", + "packages": [], + "packages-dev": [ + { + "name": "psalm/phar", + "version": "6.16.1", + "source": { + "type": "git", + "url": "https://github.com/psalm/phar.git", + "reference": "11c6b55449667837fc07bb2a456c45a137c05ecd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/psalm/phar/zipball/11c6b55449667837fc07bb2a456c45a137c05ecd", + "reference": "11c6b55449667837fc07bb2a456c45a137c05ecd", + "shasum": "" + }, + "require": { + "php": "^8.2" + }, + "conflict": { + "vimeo/psalm": "*" + }, + "bin": [ + "psalm.phar" + ], + "type": "library", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Composer-based Psalm Phar", + "support": { + "issues": "https://github.com/psalm/phar/issues", + "source": "https://github.com/psalm/phar/tree/6.16.1" + }, + "time": "2026-03-19T11:11:23+00:00" + }, { "name": "psr/log", "version": "3.0.2", @@ -57,7 +93,6 @@ "time": "2024-09-11T13:17:53+00:00" } ], - "packages-dev": [], "aliases": [], "minimum-stability": "stable", "stability-flags": {}, @@ -65,5 +100,5 @@ "prefer-lowest": false, "platform": {}, "platform-dev": {}, - "plugin-api-version": "2.6.0" + "plugin-api-version": "2.9.0" }