Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .github/workflows/deptrac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,5 @@ jobs:
- name: Install dependencies
run: composer install --prefer-dist --no-progress

- name: Install deptrac
run: composer req --dev qossmic/deptrac-shim
if: hashFiles('vendor/bin/deptrac') == ''

- name: Run deptrac
run: php vendor/bin/deptrac analyse
4 changes: 3 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"ramsey/uuid": "^4.0"
},
"require-dev": {
"deptrac/deptrac": "^4.2",
"driftingly/rector-laravel": "^2.0",
"ergebnis/phpstan-rules": "^2.1",
"infection/infection": "~0.27",
Expand Down Expand Up @@ -77,7 +78,8 @@
"ecs-fix": "@php vendor/bin/ecs check --fix",
"ecs-cc": "@php vendor/bin/ecs --clear-cache",
"rector": "@php vendor/bin/rector process --dry-run",
"rector-fix": "@php vendor/bin/rector process"
"rector-fix": "@php vendor/bin/rector process",
"deptrac": "@php vendor/bin/deptrac analyse"
},
"extra": {
"laravel": {
Expand Down
145 changes: 73 additions & 72 deletions deptrac.yaml
Original file line number Diff line number Diff line change
@@ -1,174 +1,174 @@
parameters:
deptrac:
paths:
- ./src

layers:
- name: Legacy
collectors:
- type: className
regex: ^Bavix\\.*\\Objects\\Cart$
- type: classLike
value: ^Bavix\\.*\\Objects\\Cart$

- name: Contract
collectors:
- type: className
regex: ^Bavix\\Wallet\\Interfaces\\.*
- type: className
regex: ^Bavix\\Wallet\\External\\Contracts\\.*
- type: className
regex: ^Bavix\\Wallet\\External\\Dto\\.*
- type: classLike
value: ^Bavix\\Wallet\\Interfaces\\.*
- type: classLike
value: ^Bavix\\Wallet\\External\\Contracts\\.*
- type: classLike
value: ^Bavix\\Wallet\\External\\Dto\\.*

- name: Api
collectors:
- type: className
regex: ^Bavix\\Wallet\\External\\Api\\.*Interface$
- type: classLike
value: ^Bavix\\Wallet\\External\\Api\\.*Interface$

- name: ApiQuery
collectors:
- type: className
regex: ^Bavix\\Wallet\\External\\Api\\.*Query$
- type: classLike
value: ^Bavix\\Wallet\\External\\Api\\.*Query$

- name: ApiHandler
collectors:
- type: className
regex: ^Bavix\\Wallet\\External\\Api\\.*Handler$
- type: classLike
value: ^Bavix\\Wallet\\External\\Api\\.*Handler$

- name: UI
collectors:
- type: className
regex: ^Bavix\\.*\\Traits\\.*
- type: classLike
value: ^Bavix\\.*\\Traits\\.*

- name: UIException
collectors:
- type: className
regex: ^Illuminate\\Database\\Eloquent\\ModelNotFoundException$
- type: className
regex: ^Bavix\\Wallet\\Exceptions\\.*
- type: classLike
value: ^Illuminate\\Database\\Eloquent\\ModelNotFoundException$
- type: classLike
value: ^Bavix\\Wallet\\Exceptions\\.*

# internal
- name: InternalException
collectors:
- type: className
regex: ^Bavix\\.*\\Internal\\Exceptions\\.*
- type: classLike
value: ^Bavix\\.*\\Internal\\Exceptions\\.*

- name: InternalListener
collectors:
- type: className
regex: ^Bavix\\.*\\Internal\\Listeners\\.*
- type: classLike
value: ^Bavix\\.*\\Internal\\Listeners\\.*

- name: Event
collectors:
- type: className
regex: ^Bavix\\.*\\Internal\\Events\\.*Event$
- type: classLike
value: ^Bavix\\.*\\Internal\\Events\\.*Event$

- name: EventInterface
collectors:
- type: className
regex: ^Bavix\\.*\\Internal\\Events\\.*EventInterface$
- type: classLike
value: ^Bavix\\.*\\Internal\\Events\\.*EventInterface$

- name: Dto
collectors:
- type: className
regex: ^Bavix\\.*\\Internal\\Dto\\.*Dto$
- type: classLike
value: ^Bavix\\.*\\Internal\\Dto\\.*Dto$

- name: DtoInterface
collectors:
- type: className
regex: ^Bavix\\.*\\Internal\\Dto\\.*DtoInterface$
- type: classLike
value: ^Bavix\\.*\\Internal\\Dto\\.*DtoInterface$

- name: AssemblerDto
collectors:
- type: className
regex: ^Bavix\\.*\\Internal\\Assembler\\.*DtoAssembler$
- type: classLike
value: ^Bavix\\.*\\Internal\\Assembler\\.*DtoAssembler$

- name: AssemblerDtoInterface
collectors:
- type: className
regex: ^Bavix\\.*\\Internal\\Assembler\\.*DtoAssemblerInterface$
- type: classLike
value: ^Bavix\\.*\\Internal\\Assembler\\.*DtoAssemblerInterface$

- name: QueryInterface
collectors:
- type: className
regex: ^Bavix\\.*Internal\\Query\\.*QueryInterface$
- type: classLike
value: ^Bavix\\.*Internal\\Query\\.*QueryInterface$

- name: Query
collectors:
- type: className
regex: ^Bavix\\.*Internal\\Query\\.*Query$
- type: classLike
value: ^Bavix\\.*Internal\\Query\\.*Query$

- name: RepositoryInterface
collectors:
- type: className
regex: ^Bavix\\.*Internal\\Repository\\.*RepositoryInterface$
- type: classLike
value: ^Bavix\\.*Internal\\Repository\\.*RepositoryInterface$

- name: Repository
collectors:
- type: className
regex: ^Bavix\\.*Internal\\Repository\\.*Repository$
- type: classLike
value: ^Bavix\\.*Internal\\Repository\\.*Repository$

- name: Transform
collectors:
- type: className
regex: ^Bavix\\.*Internal\\Transform\\.*DtoTransformer$
- type: classLike
value: ^Bavix\\.*Internal\\Transform\\.*DtoTransformer$

- name: TransformInterface
collectors:
- type: className
regex: ^Bavix\\.*Internal\\Transform\\.*DtoTransformerInterface$
- type: classLike
value: ^Bavix\\.*Internal\\Transform\\.*DtoTransformerInterface$

- name: Infra
collectors:
- type: className
regex: ^Bavix\\.*Internal\\Service\\.*Service$
- type: classLike
value: ^Bavix\\.*Internal\\Service\\.*Service$

- name: ServiceDecorator
collectors:
- type: className
regex: ^Bavix\\.*Decorator\\.*Decorator
- type: classLike
value: ^Bavix\\.*Decorator\\.*Decorator

# contracts
- name: Model
collectors:
- type: className
regex: ^Bavix\\.*Models\\Transaction$
- type: className
regex: ^Bavix\\.*Models\\Transfer$
- type: className
regex: ^Bavix\\.*Models\\Wallet$
- type: classLike
value: ^Bavix\\.*Models\\Transaction$
- type: classLike
value: ^Bavix\\.*Models\\Transfer$
- type: classLike
value: ^Bavix\\.*Models\\Wallet$

- name: Service
collectors:
- type: className
regex: ^Bavix\\.*Services\\.*Service$
- type: classLike
value: ^Bavix\\.*Services\\.*Service$

- name: ServiceInterface
collectors:
- type: className
regex: ^Bavix\\.*Service\\.*ServiceInterface$
- type: className
regex: ^Bavix\\.*Services\\.*ServiceInterface$
- type: classLike
value: ^Bavix\\.*Service\\.*ServiceInterface$
- type: classLike
value: ^Bavix\\.*Services\\.*ServiceInterface$

# framework
- name: EloquentModel
collectors:
- type: className
regex: ^Illuminate\\Database\\Eloquent\\Model$
- type: classLike
value: ^Illuminate\\Database\\Eloquent\\Model$

- name: Config
collectors:
- type: className
regex: ^Illuminate\\Config\\Repository$
- type: classLike
value: ^Illuminate\\Config\\Repository$

- name: Cache
collectors:
- type: className
regex: ^Illuminate\\Contracts\\Cache\\Repository$
- type: classLike
value: ^Illuminate\\Contracts\\Cache\\Repository$

ruleset:
Contract:
- InternalException
- DtoInterface
- UIException
- Model
- EloquentModel

ApiQuery:
- Api
Expand Down Expand Up @@ -196,6 +196,7 @@ parameters:
- UIException
- Contract
- Model
- EloquentModel
- Legacy # delete as soon as possible

UIException:
Expand Down
Loading
Loading