@@ -24,8 +24,8 @@ includes:
2424parameters:
2525 namespace_constraints:
2626 constraints:
27- - from: App\\SourceNamespace\\.* # Everything inside this namespace has access to
28- to: [App\\TargetNamespace \\.*] # this namespace
27+ - from: ' App\\SourceNamespace( \\.*)?' # Everything inside this namespace has access to
28+ to: [' App\\SourceNamespace( \\.*)?' ] # this namespace
2929```
3030
3131## Examples
@@ -46,17 +46,17 @@ includes:
4646parameters:
4747 namespace_constraints:
4848 constraints:
49- - from: App\\Core(\\.*)?
50- to: [App\\Core(\\.*)?]
51- - from: App\\Data(\\.*)?
49+ - from: ' App\\Core(\\.*)?'
50+ to: [' App\\Core(\\.*)?' ]
51+ - from: ' App\\Data(\\.*)?'
5252 to:
53- - App\\Core(\\.*)?
54- - App\\Data(\\.*)?
55- - from: App\\UserInterface(\\.*)?
53+ - ' App\\Core(\\.*)?'
54+ - ' App\\Data(\\.*)?'
55+ - from: ' App\\UserInterface(\\.*)?'
5656 to:
57- - App\\Core(\\.*)?
58- - App\\Data(\\.*)?
59- - App\\UserInterface(\\.*)?
57+ - ' App\\Core(\\.*)?'
58+ - ' App\\Data(\\.*)?'
59+ - ' App\\UserInterface(\\.*)?'
6060```
6161
6262### Advanced
@@ -68,7 +68,6 @@ graph TD;
6868 App\*\Core-->App\Shared\Core
6969```
7070
71-
7271``` neon
7372# phpstan.neon
7473includes:
@@ -78,12 +77,12 @@ parameters:
7877 namespace_constraints:
7978 constraints:
8079 # App\User Constraints
81- - from: App\\User\\Core(\\.*)?
82- to: [App\\User\\Core(\\.*)?]
80+ - from: ' App\\User\\Core(\\.*)?'
81+ to: [' App\\User\\Core(\\.*)?' ]
8382 # App\\Blog\ Constraints
84- - from: App\\Blog\\Core(\\.*)?
85- to: [App\\Blog\\Core(\\.*)?]
83+ - from: ' App\\Blog\\Core(\\.*)?'
84+ to: [' App\\Blog\\Core(\\.*)?' ]
8685 # App\*\Core -> App\Shared\Core
87- - from: App\\(\w+)\\Core(\\.*)?
88- to: [App\\Shared\\Core(\\.*)?]
86+ - from: ' App\\(\w+)\\Core(\\.*)?'
87+ to: [' App\\Shared\\Core(\\.*)?' ]
8988```
0 commit comments