Skip to content

Commit

Permalink
OXDEV-7644 Add deptrac layers and rulesets
Browse files Browse the repository at this point in the history
  • Loading branch information
NikolaIvanovski committed Dec 19, 2023
1 parent ebd7559 commit 96d4986
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 1 deletion.
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@
"static": [
"@phpcs",
"@phpstan",
"@phpmd"
"@phpmd",
"@deptrac"
],

"phpunit": "vendor/bin/phpunit --bootstrap=/var/www/source/bootstrap.php --config=tests/",
Expand Down
39 changes: 39 additions & 0 deletions deptrac.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
deptrac:
paths:
- ./src/
layers:
- name: Controller
collectors:
- type: classLike
value: OxidEsales\\.*GraphQL.*Controller\\.*
- name: Service
collectors:
- type: classLike
value: OxidEsales\\.*GraphQL.*Service\\.*
- name: Infrastructure
collectors:
- type: classLike
value: OxidEsales\\.*GraphQL.*Repository\\.*
- type: classLike
value: OxidEsales\\.*GraphQL.*Infrastructure\\.*
- name: InternalService
collectors:
- type: classLike
regex: OxidEsales\\Eshop.*\\Internal\\.*
- name: Core
collectors:
- type: classLike
regex: OxidEsales\\Eshop(\w+)?\\(?!Internal)

ruleset:
Controller:
- Service
Service:
- InternalService
- Infrastructure
Infrastructure:
- Core
- InternalService
Core: ~
InternalService: ~

0 comments on commit 96d4986

Please sign in to comment.