Skip to content

x: Added phpstan rules to verify access between layers in hexagonal arch… #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

krchiper
Copy link

Verify access rules from Hexagonal architecture, that dictates only outer layers may depend on inner layers

Infrastructure -> Application Service -> Domain Service -> Domain Repository -> Domain Entities -> Domain Value Objects

image

@krchiper krchiper self-assigned this Apr 25, 2025
@krchiper krchiper changed the title Added phpstan rules to verify access between layers in hexagonal arch… x: Added phpstan rules to verify access between layers in hexagonal arch… Apr 26, 2025
Copy link
Contributor

@frederikhs frederikhs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cool, havde lidt idéer

@@ -41,6 +45,11 @@
"Hiper\\PHPStan\\": "src"
}
},
"autoload-dev": {
"psr-4": {
"Test\\": "tests/test-fixtures"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

eneste jeg tænker er om namespace ikke skal være Test\Fixtures\DDD så de var adskilt fra class const reglens fixtures. I samme omfang kunne de også flyttes til en undermappe under test-fixtures (men de har ikke namespace så behøver ikke namespace ændring

Comment on lines +15 to 18
{
"name": "Kim Winther Carlsen",
"homepage": "https://github.com/krchiper"
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

husk også at tilføje dig selv til CODEOWNERS filen @ .github/CODEOWNERS. Med stjerne på repo og evt med overskrivning på src/Rules/DomainDrivenDesignRule.php samt fixtures

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants