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
310
Avoiding the mud
richardmiller
22
11k
better searching with elasticsearch - PHPConfPL
richardmiller
2
530
better searching with elasticsearch
richardmiller
2
310
Avoiding the mud - Symfony Live London
richardmiller
7
790
What do I get from the full stack framework?
richardmiller
1
1.6k
Dependency Injection and the Symfony2 Service Container
richardmiller
9
13k
Other Decks in Programming
See All in Programming
10 Tips of AWS ~Gen AI on AWS~
licux
5
500
アーキテクチャモダナイゼーションとは何か
nwiizo
19
5.6k
2026-04-15 Spring IO - I Can See Clearly Now
jonatan_ivanov
1
140
2026年のソフトウェア開発を考える(2026/05版) / Software Engineering Scrum Fest Niigata 2026 Edition
twada
PRO
8
3k
How We Practice Exploratory Testing in Iterative Development( #scrumniigata ) / 反復開発の中で、探索的テストをどう実施しているか
teyamagu
PRO
0
130
ハーネスエンジニアリングとは?
kinopeee
13
6.4k
CursorとClaudeCodeとCodexとOpenCodeを実際に比較してみた
terisuke
1
500
Going Multiplatform with Your Android App (Android Makers 2026)
zsmb
2
460
GitHubCopilotCLIをはじめよう.pdf
htkym
0
290
ついに来た!本格的なマルチクラウド時代の Google Cloud
maroon1st
0
300
検索設計から 推論設計への重心移動と Recall-First Retrieval
po3rin
4
1.3k
GNU Makeの使い方 / How to use GNU Make
kaityo256
PRO
16
5.6k
Featured
See All Featured
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
130
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
330
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.4k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.4k
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.4k
Building a Modern Day E-commerce SEO Strategy
aleyda
45
9k
New Earth Scene 8
popppiees
3
2.1k
Facilitating Awesome Meetings
lara
57
6.8k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
200
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
5.9k
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
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