From 9bd1273860121ad5add4a03b147d552e8c65e594 Mon Sep 17 00:00:00 2001 From: Sina Kuhestani Date: Tue, 27 Oct 2026 14:59:36 +0330 Subject: [PATCH 1/5] Add Psalm PHPUnit plugin for test-aware analysis --- composer.json | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/composer.json b/composer.json index 9e8c53f..224845a 100644 --- a/composer.json +++ b/composer.json @@ -5,19 +5,17 @@ "license": "MIT", "keywords": [ "php", - "skeleton", - "template", - "test-driven-development", - "testing", "phpunit", - "phpstan", "psalm", - "php-cs-fixer" + "php-cs-fixer", + "phpstan", + "testing", + "test-driven-development" ], "homepage": "https://github.com/EphpicMan/TD-PHP", "support": { - "issues": "https://github.com/EphpicMan/TD-PHP/issues", - "source": "https://github.com/EphpicMan/TD-PHP" + "issues": "https://github.com/ephpicman/TD-PHP/issues", + "source": "https://github.com/ephpicman/TD-PHP" }, "authors": [ { @@ -29,12 +27,12 @@ ], "autoload": { "psr-4": { - "App\\": "src/" + "App\\\\": "src/" } }, "autoload-dev": { "psr-4": { - "Tests\\": "tests/" + "Tests\\\\": "tests/" } }, "require": { @@ -44,6 +42,7 @@ "friendsofphp/php-cs-fixer": "^3.95", "phpstan/phpstan": "^2.2", "phpunit/phpunit": "^11.5", + "psalm/plugin-phpunit": "^0.20.4", "vimeo/psalm": "^6.16" }, "scripts": { From 31f8ecfee189b1990326017a69c410240bc4ccbf Mon Sep 17 00:00:00 2001 From: Sina Kuhestani Date: Tue, 27 Oct 2026 14:59:43 +0330 Subject: [PATCH 2/5] Preserve Composer template metadata --- composer.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/composer.json b/composer.json index 224845a..a23f634 100644 --- a/composer.json +++ b/composer.json @@ -6,11 +6,11 @@ "keywords": [ "php", "phpunit", + "phpstan", "psalm", "php-cs-fixer", - "phpstan", - "testing", - "test-driven-development" + "test-driven-development", + "testing" ], "homepage": "https://github.com/EphpicMan/TD-PHP", "support": { @@ -27,12 +27,12 @@ ], "autoload": { "psr-4": { - "App\\\\": "src/" + "App\\": "src/" } }, "autoload-dev": { "psr-4": { - "Tests\\\\": "tests/" + "Tests\\": "tests/" } }, "require": { From 81ef3f5d03497613e1ac550a5762b1863a11405d Mon Sep 17 00:00:00 2001 From: Sina Kuhestani Date: Tue, 27 Oct 2026 14:59:47 +0330 Subject: [PATCH 3/5] Enable PHPUnit-aware Psalm analysis --- psalm.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/psalm.xml b/psalm.xml index d88bbc5..c113279 100644 --- a/psalm.xml +++ b/psalm.xml @@ -13,4 +13,7 @@ + + + From a140f58e443fb493350d5837469f296d32264833 Mon Sep 17 00:00:00 2001 From: Sina Kuhestani Date: Tue, 27 Oct 2026 14:59:50 +0330 Subject: [PATCH 4/5] Remove redundant test-class Psalm suppression --- tests/Unit/ExampleTest.php | 3 --- 1 file changed, 3 deletions(-) diff --git a/tests/Unit/ExampleTest.php b/tests/Unit/ExampleTest.php index 93aa510..42afdad 100644 --- a/tests/Unit/ExampleTest.php +++ b/tests/Unit/ExampleTest.php @@ -7,9 +7,6 @@ use App\Example; use PHPUnit\Framework\TestCase; -/** - * @psalm-suppress UnusedClass - */ final class ExampleTest extends TestCase { public function testItGreets(): void From d3e2769929d9de2b4ba703492dcd5cb41abd9626 Mon Sep 17 00:00:00 2001 From: Sina Kuhestani Date: Tue, 27 Oct 2026 15:00:13 +0330 Subject: [PATCH 5/5] Keep the Composer diff focused --- composer.json | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/composer.json b/composer.json index a23f634..5dee51b 100644 --- a/composer.json +++ b/composer.json @@ -5,17 +5,19 @@ "license": "MIT", "keywords": [ "php", + "skeleton", + "template", + "test-driven-development", + "testing", "phpunit", "phpstan", "psalm", - "php-cs-fixer", - "test-driven-development", - "testing" + "php-cs-fixer" ], "homepage": "https://github.com/EphpicMan/TD-PHP", "support": { - "issues": "https://github.com/ephpicman/TD-PHP/issues", - "source": "https://github.com/ephpicman/TD-PHP" + "issues": "https://github.com/EphpicMan/TD-PHP/issues", + "source": "https://github.com/EphpicMan/TD-PHP" }, "authors": [ {