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
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
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
450
Symfony Notifier Component
jschaedl
0
430
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
AI Agent の開発と運用を支える Durable Execution #AgentsInProd
izumin5210
7
2.4k
カスタマーサクセス業務を変革したヘルススコアの実現と学び
_hummer0724
0
810
個人開発は儲からない - それでも開発開始1ヶ月で300万円売り上げた方法
taishiyade
0
110
Raku Raku Notion 20260128
hareyakayuruyaka
0
400
開発者から情シスまで - 多様なユーザー層に届けるAPI提供戦略 / Postman API Night Okinawa 2026 Winter
tasshi
0
220
AIプロダクト時代のQAエンジニアに求められること
imtnd
1
380
CSC307 Lecture 12
javiergs
PRO
0
430
Data-Centric Kaggle
isax1015
2
800
izumin5210のプロポーザルのネタ探し #tskaigi_msup
izumin5210
1
190
15年続くIoTサービスのSREエンジニアが挑む分散トレーシング導入
melonps
2
250
AIと一緒にレガシーに向き合ってみた
nyafunta9858
0
310
OCaml 5でモダンな並列プログラミングを Enjoyしよう!
haochenx
0
160
Featured
See All Featured
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.3k
Producing Creativity
orderedlist
PRO
348
40k
How to make the Groovebox
asonas
2
2k
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
60
42k
Prompt Engineering for Job Search
mfonobong
0
170
Mobile First: as difficult as doing things right
swwweet
225
10k
Chasing Engaging Ingredients in Design
codingconduct
0
120
Making the Leap to Tech Lead
cromwellryan
135
9.7k
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
0
230
Code Reviewing Like a Champion
maltzj
527
40k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3.3k
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