-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdeptrac_layers.yaml
74 lines (62 loc) · 2.53 KB
/
deptrac_layers.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
deptrac:
cache_file: .cache/deptrac_layers.cache
paths:
- ./src
layers:
- name: Domain
collectors:
- { type: classLike, value: ^App\\.+\\Domain\\ }
- name: Application
collectors:
- { type: classLike, value: ^App\\.+\\Application\\ }
- name: Infrastructure
collectors:
- { type: classLike, value: ^App\\.+\\Infrastructure\\ }
- name: Vendor_Doctrine_Mapping
collectors:
- { type: classLike, value: ^Doctrine\\Orm\\Mapping }
- { type: classLike, value: ^Doctrine\\DBAL\\Types }
- name: Vendor_Symfony_Assert
collectors:
- { type: classLike, value: ^Symfony\\Component\\Validator\\Constraints }
- name: Vendor_Symfony_Clock_Clock
collectors:
- { type: classLike, value: ^Symfony\\Component\\Clock\\Clock }
- name: Vendor_Symfony_TranslatableMessage
collectors:
- { type: classLike, value: ^Symfony\\Component\\Translation\\TranslatableMessage }
- name: Vendor_Symfony_Uid_Uuid
collectors:
- { type: classLike, value: ^Symfony\\Component\\Uid\\Uuid }
- name: Vendor
collectors:
- type: bool
must:
- { type: classLike, value: ^(?!App\\) }
must_not:
- { type: classLike, value: '^[a-zA-Z]+$' } # native PHP classes
- { type: layer, value: Vendor_Doctrine_Mapping }
- { type: layer, value: Vendor_Symfony_Assert }
- { type: layer, value: Vendor_Symfony_Clock_Clock }
- { type: layer, value: Vendor_Symfony_TranslatableMessage }
- { type: layer, value: Vendor_Symfony_Uid_Uuid }
ruleset:
Domain:
- Vendor_Doctrine_Mapping
- Vendor_Symfony_Assert
- Vendor_Symfony_Clock_Clock
- Vendor_Symfony_TranslatableMessage
- Vendor_Symfony_Uid_Uuid
Application:
- Domain
- Vendor
Infrastructure:
- Domain
- Application
- Vendor
- Vendor_Doctrine_Mapping
skip_violations:
# My User entity is bound to Symfony Security, what's the best way to not violate this?
App\User\Domain\User:
- Symfony\Component\Security\Core\User\UserInterface
- Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface