Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Dependency Tracking with Deptrac
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Jan Schädlich
October 13, 2020
Programming
1
650
Dependency Tracking with Deptrac
Jan Schädlich
October 13, 2020
Tweet
Share
More Decks by Jan Schädlich
See All by Jan Schädlich
Demystifying Bundles
jschaedl
1
260
Symfony Notifier Demystified
jschaedl
3
210
Symfony Notifier Demystified
jschaedl
4
440
Symfony Notifier Component
jschaedl
0
420
What's new in Symfony 4.4/5.0
jschaedl
0
350
What's new in Symfony 4.3
jschaedl
0
400
Other Decks in Programming
See All in Programming
Best-Practices-for-Cortex-Analyst-and-AI-Agent
ryotaroikeda
1
100
OSSとなったswift-buildで Xcodeのビルドを差し替えられるため 自分でXcodeを直せる時代になっている ダイアモンド問題編
yimajo
3
620
今こそ知るべき耐量子計算機暗号(PQC)入門 / PQC: What You Need to Know Now
mackey0225
3
370
AgentCoreとHuman in the Loop
har1101
5
230
【卒業研究】会話ログ分析によるユーザーごとの関心に応じた話題提案手法
momok47
0
200
コマンドとリード間の連携に対する脅威分析フレームワーク
pandayumi
1
450
KIKI_MBSD Cybersecurity Challenges 2025
ikema
0
1.3k
0→1 フロントエンド開発 Tips🚀 #レバテックMeetup
bengo4com
0
560
登壇資料を作る時に意識していること #登壇資料_findy
konifar
4
1.1k
なるべく楽してバックエンドに型をつけたい!(楽とは言ってない)
hibiki_cube
0
140
Oxlint JS plugins
kazupon
1
890
360° Signals in Angular: Signal Forms with SignalStore & Resources @ngLondon 01/2026
manfredsteyer
PRO
0
120
Featured
See All Featured
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
130
Bash Introduction
62gerente
615
210k
The Limits of Empathy - UXLibs8
cassininazir
1
210
New Earth Scene 8
popppiees
1
1.5k
Designing for humans not robots
tammielis
254
26k
Done Done
chrislema
186
16k
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
0
110
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
2
420
Principles of Awesome APIs and How to Build Them.
keavy
128
17k
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
0
200
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
190
Transcript
Dependency Tracking with Deptrac Jan Schädlich @jschaedl SensioLabs 2020-10-13 |
Symfony User Group Hamburg An Introduction with Examples
Software Architecture
–Ralph Johnson „Architecture is about the important stuff. Whatever that
is.“
Core Admin Customer Driven Driving Hexagonal Architecture Onion Architecture Separation
of Concerns ‣ Separation is achieved by dividing the software into layers ‣ At least one layer for business rules and another for interfaces
None
How to ensure that our code follows the defined architecture?
https://github.com/sensiolabs-de/deptrac Deptrac
Installation
✓ PHAR | https://github.com/sensiolabs-de/deptrac/releases ✓ phive install -g sensiolabs-de/deptrac ✓
composer require --dev sensiolabs-de/deptrac-shim X composer require --dev sensiolabs-de/deptrac
The depfile.yaml
# depfile.yaml paths: - ./src exclude_files: - .*Tests.* - .*Resources.*
- .*DependencyInjection.*
# ... layers: - name: Entity collectors: - type: className
regex: .*\\App\\Entity\\.* ‣ There are also other collector types available.
# ... layers: # ... - name: UseCase collectors: -
type: className regex: .*\\App\\UseCase\\.*
# ... layers: # ... - name: Controller collectors: -
type: className regex: .*\\App\\Controller\\.*
# ... ruleset: Entity: ~ UseCase: - Entity Controller: -
Entity - UseCase The Entity layer must not depend on other layers. The UseCase layer only depends on the Entity layer. The Controller layer can depend on the Entity and the UseCase layer.
Collectors
# directory - name: Controller collectors: - type: directory regex:
./App/Controller/.*
# className - name: Controller collectors: - type: className regex:
.*App\\.*Controller.*
# classNameRegex - name: Controller collectors: - type: classNameRegex regex:
'#.*App\\.*Controller.*#'
# bool - name: Admin collectors: - type: bool must:
- type: className regex: .*\\Admin\\.* must_not: - type: className regex: .*\\AdminBundle\\.*
# method - name: Foo services collectors: - type: method
name: .*foo
# implements - name: Foo collectors: - type: implements name:
'App\SomeInterface'
# extends - name: Foo collectors: - type: extends name:
'App\SomeClass'
# uses - name: Foo collectors: - type: uses name:
'App\SomeTrait'
# inherits - name: Foo collectors: - type: inherits name:
'App\{Interface|Class|Trait}'
Formatters
Console ‣ This is the default formatter.
None
Github Actions ‣ Default formatter in Github Actions environment.
Github Actions
$ deptrac analyze examples/ControllerServiceRepository1.depfile.yml \ -—formatter-graphviz=1 \ --formatter-graphviz-display=1 \ --formatter-graphviz-dump-image=path/to/file.png
\ --formatter-graphviz-dump-dot=path/to/file.dot \ —-formatter-graphviz-dump-html=path/to/file.html Graphviz
$ deptrac analyze examples/ControllerServiceRepository1.depfile.yml \ -—formatter-junit=1 \ —-formatter-junit-dump-xml=./junit-report.xml JUnit
$ deptrac analyze examples/ControllerServiceRepository1.depfile.yml \ -—formatter-xml=1 \ —-formatter-xml-dump-xml=./deptrac-report.xml XML
https://github.com/jschaedl/sfughh-deptrac Demo
More
None
None
# skip_violations skip_violations: App\SomeClass: - App\SomeDependency
None
Thank you! https://speakerdeck.com/jschaedl