-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdeptrac.yaml
118 lines (116 loc) · 3.51 KB
/
deptrac.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
deptrac:
paths:
- ./src
exclude_files:
- '#.*tests.*#'
layers:
- name: Domain
collectors:
- type: classLike
value: WMDE\\Fundraising\\PaymentContext\\Domain\\.*
- name: UseCase
collectors:
- type: classLike
value: WMDE\\Fundraising\\PaymentContext\\UseCases.*
- name: DataAccess
collectors:
- type: classLike
value: WMDE\\Fundraising\\PaymentContext\\DataAccess.*
- type: class
value: WMDE\\Fundraising\\PaymentContext\\ScalarTypeConverter
# Interfaces and value objects for services
- name: ServiceModel
collectors:
- type: interface
value: WMDE\\Fundraising\\PaymentContext\\Services.*
- type: class
value: WMDE\\Fundraising\\PaymentContext\\Services\\Paypal\\Model.*
- type: classLike
value: WMDE\\Fundraising\\PaymentContext\\Services\\PaymentUrlGenerator\\Sofort.*
- name: Service
collectors:
- type: bool
must:
- type: class
value: WMDE\\Fundraising\\PaymentContext\\Services.*
must_not:
- type: class
value: WMDE\\Fundraising\\PaymentContext\\Services\\Paypal\\Model.*
- type: class
value: WMDE\\Fundraising\\PaymentContext\\Services\\PaymentUrlGenerator\\Sofort.*
# Domain libraries from WMDE
- name: DomainLibrary
collectors:
- type: classNameRegex
value: /WMDE\\Euro\\.*/
- type: classNameRegex
value: /WMDE\\FunValidators\\.*/
# External Vendor libraries
- name: Doctrine
collectors:
- type: classNameRegex
value: /Doctrine\\.*/
- name: Guzzle
collectors:
- type: classNameRegex
value: /GuzzleHttp\\.*/
- name: Sofort
collectors:
- type: classNameRegex
value: /^Sofort\\.*/
- name: Psr
collectors:
- type: classNameRegex
value: /^Psr\\.*/
- name: Symfony Config
collectors:
- type: classNameRegex
value: /^Symfony\\Component\\(Config|Yaml)\\.*/
ruleset:
Domain:
- DomainLibrary
UseCase:
- Domain
- DataAccess
- ServiceInterface
- DomainLibrary
- DomainValidators
- ServiceModel
DataAccess:
- Domain
- DomainLibrary
- Doctrine
Service:
- DomainLibrary
- Domain
# This dependency is too broad, as services should not depend on whole use cases.
# At the moment the dependency is necessary, because the Services\ExternalVerificationService implementations
# depend both on the ExternalVerificationService interface and the value objects (request, response) it defines.
# A solution here would be its own namespace and layer for "UseCaseDomain" or moving the external verification
# into the Domain layer.
- UseCase
- DataAccess
- ServiceModel
# Maybe the Services should not directly depend on Doctrine but should go through the `DataAccess` layer
# TODO: Move DoctrineTransactionIdFinder.php and UniquePaymentReferenceCodeGenerator.php into DataAccess
- Doctrine
- Guzzle
- Sofort
- Psr
- Symfony Config
ServiceModel:
- Domain
- DomainLibrary
- ServiceInterface
formatters:
graphviz:
groups:
Service:
- Service
- ServiceModel
Vendor:
- Doctrine
- Guzzle
- Sofort
- Psr
- Symfony Config