From 5e8b7470a7909efa015411da03f3af58459910fd Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 5 Mar 2026 23:42:29 +0000 Subject: [PATCH 1/2] fix: fix mixed indentation in phpstan.neon includes Replace tab with spaces on the phpat extension include line to match the rest of the file and avoid NEON parse errors. https://claude.ai/code/session_01VLpcvXiDPSvMJiqQWgWaeF --- phpstan.neon | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpstan.neon b/phpstan.neon index 6d55e95..c3ece0f 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -2,7 +2,7 @@ includes: - vendor/phpstan/phpstan-phpunit/extension.neon - vendor/phpstan/phpstan-phpunit/rules.neon - lib/phpstan/phpstan.neon - - vendor/phpat/phpat/extension.neon + - vendor/phpat/phpat/extension.neon parameters: bootstrapFiles: From 6c695873d9c8c66cc96c8b578a5751d7ac70e9ea Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 7 Mar 2026 10:01:42 +0000 Subject: [PATCH 2/2] fix: fix phpcs violations in CleanArchitectureTest Rename methods to camelCase and split long line to comply with the coding standard rules. https://claude.ai/code/session_01VLpcvXiDPSvMJiqQWgWaeF --- .../PHPAt/CleanArchitectureTest.php | 78 +++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 src/ArtyCodingStandard/PHPAt/CleanArchitectureTest.php diff --git a/src/ArtyCodingStandard/PHPAt/CleanArchitectureTest.php b/src/ArtyCodingStandard/PHPAt/CleanArchitectureTest.php new file mode 100644 index 0000000..a5a1f1e --- /dev/null +++ b/src/ArtyCodingStandard/PHPAt/CleanArchitectureTest.php @@ -0,0 +1,78 @@ +classes(Selector::inNamespace('App\Domain')) + ->shouldNotDependOn() + ->classes(Selector::inNamespace('App\Application')) + ->because('Domain is the core layer and must remain independent of outer layers'); + } + + public function testDomainDoesNotDependOnInfrastructure(): Rule + { + return PHPat::rule() + ->classes(Selector::inNamespace('App\Domain')) + ->shouldNotDependOn() + ->classes(Selector::inNamespace('App\Infrastructure')) + ->because('Domain must not know about infrastructure concerns (DB, HTTP, etc.)'); + } + + public function testDomainDoesNotDependOnSymfony(): Rule + { + return PHPat::rule() + ->classes(Selector::inNamespace('App\Domain')) + ->shouldNotDependOn() + ->classes(Selector::inNamespace('Symfony')) + ->because('Domain must be framework-agnostic'); + } + + public function testDomainDoesNotDependOnDoctrine(): Rule + { + return PHPat::rule() + ->classes(Selector::inNamespace('App\Domain')) + ->shouldNotDependOn() + ->classes(Selector::inNamespace('Doctrine')) + ->because('Domain must not depend on persistence concerns'); + } + + public function testApplicationDoesNotDependOnInfrastructure(): Rule + { + return PHPat::rule() + ->classes(Selector::inNamespace('App\Application')) + ->shouldNotDependOn() + ->classes(Selector::inNamespace('App\Infrastructure')) + ->because('Application layer must depend on Domain abstractions, not Infrastructure implementations'); + } + + public function testApplicationDoesNotDependOnSymfony(): Rule + { + return PHPat::rule() + ->classes(Selector::inNamespace('App\Application')) + ->shouldNotDependOn() + ->classes(Selector::inNamespace('Symfony')) + ->because('Application use-cases must be framework-agnostic'); + } + + public function testApplicationDoesNotDependOnDoctrine(): Rule + { + return PHPat::rule() + ->classes(Selector::inNamespace('App\Application')) + ->shouldNotDependOn() + ->classes(Selector::inNamespace('Doctrine')) + ->because( + 'Application layer must not depend on persistence concerns' + . ' — use Domain repository interfaces instead' + ); + } +}