diff --git a/composer-dependency-analyser.php b/composer-dependency-analyser.php index 9ae1971..558ab23 100644 --- a/composer-dependency-analyser.php +++ b/composer-dependency-analyser.php @@ -20,6 +20,7 @@ [ 'friendsofphp/php-cs-fixer', 'phpstan/phpstan', + 'psalm/plugin-phpunit', 'psalm/plugin-symfony', 'rector/rector', 'squizlabs/php_codesniffer', diff --git a/composer.json b/composer.json index 420f5fc..08ea6c5 100644 --- a/composer.json +++ b/composer.json @@ -16,6 +16,7 @@ "friendsofphp/php-cs-fixer": "^3.93", "phpat/phpat": "^0.11.4", "phpstan/phpstan": "^2.1", + "psalm/plugin-phpunit": "^0.19", "psalm/plugin-symfony": "^5.3", "rector/rector": "^2.0", "squizlabs/php_codesniffer": "^3.10", diff --git a/dist/psalm.xml.dist b/dist/psalm.xml.dist index cba18c8..359a9fb 100644 --- a/dist/psalm.xml.dist +++ b/dist/psalm.xml.dist @@ -15,6 +15,7 @@ + diff --git a/docs/Psalm/README.md b/docs/Psalm/README.md index c827acd..bb872e3 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 @@ -55,6 +56,7 @@ Stubs help Psalm understand types from external libraries that lack proper type + @@ -83,6 +85,7 @@ Suppress specific issues for certain directories or files: + @@ -120,6 +123,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 diff --git a/psalm.xml b/psalm.xml index 6e5b0ae..1bfbd3e 100644 --- a/psalm.xml +++ b/psalm.xml @@ -21,6 +21,7 @@ +