Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Dependency Tracking with Deptrac
Search
Jan Schädlich
October 13, 2020
Programming
1
640
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
250
Symfony Notifier Demystified
jschaedl
3
190
Symfony Notifier Demystified
jschaedl
4
440
Symfony Notifier Component
jschaedl
0
420
What's new in Symfony 4.4/5.0
jschaedl
0
340
What's new in Symfony 4.3
jschaedl
0
390
Other Decks in Programming
See All in Programming
愛される翻訳の秘訣
kishikawakatsumi
3
330
ゲームの物理 剛体編
fadis
0
360
20251212 AI 時代的 Legacy Code 營救術 2025 WebConf
mouson
0
200
AI時代を生き抜く 新卒エンジニアの生きる道
coconala_engineer
1
360
ZJIT: The Ruby 4 JIT Compiler / Ruby Release 30th Anniversary Party
k0kubun
0
130
Developing static sites with Ruby
okuramasafumi
0
310
著者と進める!『AIと個人開発したくなったらまずCursorで要件定義だ!』
yasunacoffee
0
150
AIコーディングエージェント(Gemini)
kondai24
0
250
Rubyで鍛える仕組み化プロヂュース力
muryoimpl
0
150
生成AIを利用するだけでなく、投資できる組織へ
pospome
2
370
ELYZA_Findy AI Engineering Summit登壇資料_AIコーディング時代に「ちゃんと」やること_toB LLMプロダクト開発舞台裏_20251216
elyza
2
400
AIの誤りが許されない業務システムにおいて“信頼されるAI” を目指す / building-trusted-ai-systems
yuya4
6
3.8k
Featured
See All Featured
Building AI with AI
inesmontani
PRO
1
560
WCS-LA-2024
lcolladotor
0
380
Information Architects: The Missing Link in Design Systems
soysaucechin
0
710
Applied NLP in the Age of Generative AI
inesmontani
PRO
3
1.9k
How To Stay Up To Date on Web Technology
chriscoyier
791
250k
Java REST API Framework Comparison - PWX 2021
mraible
34
9k
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
0
940
Bootstrapping a Software Product
garrettdimon
PRO
307
120k
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
75
For a Future-Friendly Web
brad_frost
180
10k
Designing Experiences People Love
moore
143
24k
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1k
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