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
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
320
Avoiding the mud
richardmiller
22
11k
better searching with elasticsearch - PHPConfPL
richardmiller
2
530
better searching with elasticsearch
richardmiller
2
320
Avoiding the mud - Symfony Live London
richardmiller
7
790
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
WebAssembly を読み込むベストプラクティス 2026年春版 / Best Practices for Loading WebAssembly (Spring 2026)
petamoriken
5
1.1k
検索設計から 推論設計への重心移動と Recall-First Retrieval
po3rin
5
1.7k
HTML-Aware ERB: The Path to Reactive Rendering @ RubyKaigi 2026, Hakodate, Japan
marcoroth
0
710
空間オーディオの活用
objectiveaudio
0
150
ついに来た!本格的なマルチクラウド時代の Google Cloud
maroon1st
0
440
ふにゃっとしない名前の付け方 〜哲学で茹で上げる、コシのあるソフトウェア設計〜
shimomura
0
120
Firefoxにコントリビューションして得られた学び
ken7253
2
160
属人化しないコード品質の作り方_2026.04.07.pdf
muraaano
0
350
Programming with a DJ Controller — not vibe coding
m_seki
3
860
RailsTokyo 2026#4: AI様があれば、 Hotwireの弱点は消えるか?
naofumi
1
300
クラウドネイティブなエンジニアに向ける Raycastの魅力と実際の活用事例
nealle
2
260
Agentic Elixir
whatyouhide
0
450
Featured
See All Featured
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
290
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
1.9k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.7k
SEO for Brand Visibility & Recognition
aleyda
0
4.5k
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3.4k
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.2k
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
140
A Soul's Torment
seathinner
6
2.8k
Building Applications with DynamoDB
mza
96
7k
Site-Speed That Sticks
csswizardry
13
1.2k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8.1k
Visualization
eitanlees
151
17k
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