From 95f9618862b648a4c8af7b82cb7141410fc03c43 Mon Sep 17 00:00:00 2001 From: Kevin Pfeifer Date: Sun, 15 Mar 2026 15:08:34 +0100 Subject: [PATCH] re-add psalm v7 --- .phive/phars.xml | 1 + composer.json | 6 ++- psalm-baseline.xml | 73 +++++------------------------------ psalm.xml | 21 +++------- src/Mailer/AbstractResult.php | 2 + src/Mailer/PreviewResult.php | 2 + src/Mailer/SentMailResult.php | 2 + 7 files changed, 28 insertions(+), 79 deletions(-) diff --git a/.phive/phars.xml b/.phive/phars.xml index a95d33f9a..13a095e56 100644 --- a/.phive/phars.xml +++ b/.phive/phars.xml @@ -1,4 +1,5 @@ + diff --git a/composer.json b/composer.json index a48ca62bf..fd4bdcaa2 100644 --- a/composer.json +++ b/composer.json @@ -63,8 +63,12 @@ "cs-check": "phpcs", "cs-fix": "phpcbf", "phpstan": "tools/phpstan analyse", - "stan": "@phpstan", + "stan": [ + "tools/phpstan analyse", + "tools/psalm" + ], "stan-baseline": "tools/phpstan --generate-baseline", + "psalm-baseline": "tools/psalm --set-baseline=psalm-baseline.xml", "stan-setup": "phive install", "test": "phpunit" }, diff --git a/psalm-baseline.xml b/psalm-baseline.xml index 50bb3f068..91a8f8e74 100644 --- a/psalm-baseline.xml +++ b/psalm-baseline.xml @@ -1,74 +1,21 @@ - - - - - - - - - - _composerPaths]]> - _pluginPaths]]> - - - - - - - - - - - - - - - - + + + + render()]]> + reset()]]> + viewBuilder()]]> + viewBuilder()]]> + viewBuilder()->setTemplate($method)]]> + getHeaders($extra)]]> + - - - emailLog]]> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/psalm.xml b/psalm.xml index 5b2571a6f..565cc8755 100644 --- a/psalm.xml +++ b/psalm.xml @@ -1,15 +1,14 @@ @@ -19,17 +18,9 @@ - - - - - - - - - - - - + + + + diff --git a/src/Mailer/AbstractResult.php b/src/Mailer/AbstractResult.php index b434ff151..2b51937f7 100644 --- a/src/Mailer/AbstractResult.php +++ b/src/Mailer/AbstractResult.php @@ -16,6 +16,8 @@ /** * A simple structure for representing the results of a sent email + * + * @psalm-external-mutation-free */ abstract class AbstractResult { diff --git a/src/Mailer/PreviewResult.php b/src/Mailer/PreviewResult.php index ff3bfea7f..b5f019f23 100644 --- a/src/Mailer/PreviewResult.php +++ b/src/Mailer/PreviewResult.php @@ -18,6 +18,8 @@ /** * Represents the result of a preview for a given mailer + * + * @psalm-external-mutation-free */ class PreviewResult extends AbstractResult { diff --git a/src/Mailer/SentMailResult.php b/src/Mailer/SentMailResult.php index 55d1647f6..790b7c6a9 100644 --- a/src/Mailer/SentMailResult.php +++ b/src/Mailer/SentMailResult.php @@ -16,6 +16,8 @@ /** * Represents the result of an already sent email + * + * @psalm-external-mutation-free */ class SentMailResult extends AbstractResult {