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
Advanced Service Container Utilization
Search
Richard Miller
June 11, 2012
Programming
1.3k
4
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Advanced Service Container Utilization
Richard Miller
June 11, 2012
More Decks by Richard Miller
See All by Richard Miller
Introduction to Symfony2 - DrupalCamp London 2014
richardmiller
0
330
Avoiding the mud
richardmiller
22
12k
better searching with elasticsearch - PHPConfPL
richardmiller
2
550
better searching with elasticsearch
richardmiller
2
330
Avoiding the mud - Symfony Live London
richardmiller
7
810
What do I get from the full stack framework?
richardmiller
1
1.7k
Dependency Injection and the Symfony2 Service Container
richardmiller
9
13k
Other Decks in Programming
See All in Programming
iOS開発×AI駆動開発 〜最近使って便利だったスキルの話〜
nogu66
0
140
初めての模倣学習とVLA
natsutan
0
430
バグを直したら useEffect が消えた
colorful12
3
820
Oxlintはいいぞ(続)
yug1224
1
530
Seeing Through Serverless: Observability for AWS Lambda with ADOT and CloudWatch Application Signals
seike460
PRO
1
110
typoなんかねぇよ
raspython3
0
660
「つくるAI」だけではバグは見つからない ~テストに必要な「見つけるAI」を分離させる戦略~
mfunaki
0
230
Foundry Localでエージェント開発
seosoft
0
110
型解析で実現する Go の言語内 DSL / Conference に Go! タイムテーブルの歩き方 for Gophers
mazrean
0
100
ALB ログから Trace を気合で繋げる技術
fohte
7
850
まずはプロンプトガイドを読もう、話はそれからだ
kiakiraki
1
250
書籍「プロフェッショナルAI駆動開発」紹介スライド
juntaromatsumoto
0
950
Featured
See All Featured
Practical Orchestrator
shlominoach
191
12k
Design in an AI World
tapps
1
300
Scaling GitHub
holman
464
140k
30 Presentation Tips
portentint
PRO
1
380
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
300
Highjacked: Video Game Concept Design
rkendrick25
PRO
1
450
For a Future-Friendly Web
brad_frost
183
10k
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.6k
Odyssey Design
rkendrick25
PRO
2
800
Utilizing Notion as your number one productivity tool
mfonobong
4
570
The Art of Programming - Codeland 2020
erikaheidi
57
14k
HTML-Aware ERB: The Path to Reactive Rendering @ RubyCon 2026, Rimini, Italy
marcoroth
4
550
Transcript
Advanced Service Container Utilization by Richard Miller (@mr_r_miller)
None
None
Getting the most from the Symfony2 service container
Knowing the injection options open to you
You may get to inject into the constructor
You might get to Inject into setter methods
You may have to inject into properties
You can integrate objects created by factories
You may need to integrate a static factory method
You can configure the container to use the factory method
You may be dealing with a separate factory object
You can also accommodate this with container configuration
Saving time by reducing the amount of configuration you have
to write
The wrong way with interface injection
What is interface injection?
How is interface injection configured?
Why you can't use it
The right way with parent services
You can have parent classes to reduce code repetition
You can also have a parent service to reduce repetitive
configuration
You can change configuration independently from code
Understanding the service container compilation process
You need to call compile if using the component outside
the framework
You get to load complex config from extensions
Using compiler passes to respond to other configuration
What if you want to use services from other bundles?
You need to dynamically register the tagged services
You can register compiler passes from bundles in the framework
Dumping the compiled container for performance
You get the performance benefits by caching the dumped container
You get convenience as well by avoiding the cache in
debug mode
Getting the most from the Symfony2 service container
Questions? @mr_r_miller richardmiller.co.uk