From da94b9aaaa7c812934fb2771a90be9a815429aa3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Costa?= Date: Tue, 26 May 2026 10:36:06 +0100 Subject: [PATCH 1/5] Add psalm/plugin-phpunit --- composer.json | 1 + dist/psalm.xml.dist | 1 + psalm.xml | 1 + 3 files changed, 3 insertions(+) diff --git a/composer.json b/composer.json index 420f5fc..b613a2c 100644 --- a/composer.json +++ b/composer.json @@ -17,6 +17,7 @@ "phpat/phpat": "^0.11.4", "phpstan/phpstan": "^2.1", "psalm/plugin-symfony": "^5.3", + "psalm/plugin-phpunit": "^0.19", "rector/rector": "^2.0", "squizlabs/php_codesniffer": "^3.10", "symfony/console": "^6.4 || ^7.4", diff --git a/dist/psalm.xml.dist b/dist/psalm.xml.dist index cba18c8..9db768c 100644 --- a/dist/psalm.xml.dist +++ b/dist/psalm.xml.dist @@ -16,5 +16,6 @@ + diff --git a/psalm.xml b/psalm.xml index 6e5b0ae..4ee79d8 100644 --- a/psalm.xml +++ b/psalm.xml @@ -22,6 +22,7 @@ + From 24b5b6ed0d6b7a48c83a30a456fd9077260f4bbf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Costa?= Date: Tue, 26 May 2026 10:43:44 +0100 Subject: [PATCH 2/5] Update README --- docs/Psalm/README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/Psalm/README.md b/docs/Psalm/README.md index c827acd..e4f320e 100644 --- a/docs/Psalm/README.md +++ b/docs/Psalm/README.md @@ -12,6 +12,7 @@ ## Out of the box usage - The default configuration analyzes the `src` directory with error level 2 (strict). +- The default configuration includes the Symfony and PHPUnit plugins. - The `--config` flag is used to specify the configuration to be used. ### Run Psalm analysis @@ -56,6 +57,7 @@ Stubs help Psalm understand types from external libraries that lack proper type + @@ -84,6 +86,7 @@ Suppress specific issues for certain directories or files: + @@ -121,6 +124,7 @@ Baselines allow you to suppress existing issues while enforcing strict analysis + ``` @@ -139,7 +143,7 @@ vendor/bin/psalm --config=psalm.xml | `errorLevel` | `2` | Strictness level (1=strictest, 8=most lenient) | | `findUnusedCode` | `false` | Detect unused classes, methods, and variables | | `ensureOverrideAttribute` | `false` | Require `#[Override]` attribute on overridden methods | -| `errorBaseline` | - | Path to baseline file for suppressing existing issues | +| `errorBaseline` | `—` | Path to baseline file for suppressing existing issues | ## Baseline management From a032d766876afb0b289efe1fd0618929b9934038 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Costa?= Date: Tue, 26 May 2026 10:52:59 +0100 Subject: [PATCH 3/5] Update composer dependency analyser --- composer-dependency-analyser.php | 1 + 1 file changed, 1 insertion(+) diff --git a/composer-dependency-analyser.php b/composer-dependency-analyser.php index 9ae1971..4b7b35f 100644 --- a/composer-dependency-analyser.php +++ b/composer-dependency-analyser.php @@ -21,6 +21,7 @@ 'friendsofphp/php-cs-fixer', 'phpstan/phpstan', 'psalm/plugin-symfony', + 'psalm/plugin-phpunit', 'rector/rector', 'squizlabs/php_codesniffer', 'vimeo/psalm', From 143714f6069250ad7a75f250f990f2ab66d13a7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Costa?= Date: Tue, 26 May 2026 11:08:34 +0100 Subject: [PATCH 4/5] Fix orders --- composer-dependency-analyser.php | 2 +- composer.json | 2 +- dist/psalm.xml.dist | 2 +- psalm.xml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/composer-dependency-analyser.php b/composer-dependency-analyser.php index 4b7b35f..558ab23 100644 --- a/composer-dependency-analyser.php +++ b/composer-dependency-analyser.php @@ -20,8 +20,8 @@ [ 'friendsofphp/php-cs-fixer', 'phpstan/phpstan', - 'psalm/plugin-symfony', 'psalm/plugin-phpunit', + 'psalm/plugin-symfony', 'rector/rector', 'squizlabs/php_codesniffer', 'vimeo/psalm', diff --git a/composer.json b/composer.json index b613a2c..08ea6c5 100644 --- a/composer.json +++ b/composer.json @@ -16,8 +16,8 @@ "friendsofphp/php-cs-fixer": "^3.93", "phpat/phpat": "^0.11.4", "phpstan/phpstan": "^2.1", - "psalm/plugin-symfony": "^5.3", "psalm/plugin-phpunit": "^0.19", + "psalm/plugin-symfony": "^5.3", "rector/rector": "^2.0", "squizlabs/php_codesniffer": "^3.10", "symfony/console": "^6.4 || ^7.4", diff --git a/dist/psalm.xml.dist b/dist/psalm.xml.dist index 9db768c..359a9fb 100644 --- a/dist/psalm.xml.dist +++ b/dist/psalm.xml.dist @@ -15,7 +15,7 @@ - + diff --git a/psalm.xml b/psalm.xml index 4ee79d8..1bfbd3e 100644 --- a/psalm.xml +++ b/psalm.xml @@ -21,8 +21,8 @@ - + From 10157ab68004f58f3ff7e412170806e9382f72bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Costa?= Date: Tue, 26 May 2026 11:20:54 +0100 Subject: [PATCH 5/5] Fix orders --- docs/Psalm/README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/Psalm/README.md b/docs/Psalm/README.md index e4f320e..bb872e3 100644 --- a/docs/Psalm/README.md +++ b/docs/Psalm/README.md @@ -56,8 +56,8 @@ Stubs help Psalm understand types from external libraries that lack proper type - + @@ -85,8 +85,8 @@ Suppress specific issues for certain directories or files: - + @@ -123,8 +123,8 @@ Baselines allow you to suppress existing issues while enforcing strict analysis - + ```