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
4
1.2k
Advanced Service Container Utilization
Richard Miller
June 11, 2012
Tweet
Share
More Decks by Richard Miller
See All by Richard Miller
Introduction to Symfony2 - DrupalCamp London 2014
richardmiller
0
290
Avoiding the mud
richardmiller
22
11k
better searching with elasticsearch - PHPConfPL
richardmiller
2
520
better searching with elasticsearch
richardmiller
2
290
Avoiding the mud - Symfony Live London
richardmiller
7
770
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
Canon EOS R50 V と R5 Mark II 購入でみえてきた最近のデジイチ VR180 事情、そして VR180 静止画に活路を見出すまで
karad
0
140
Vibe codingでおすすめの言語と開発手法
uyuki234
0
180
Grafana:建立系統全知視角的捷徑
blueswen
0
290
gunshi
kazupon
1
140
[AtCoder Conference 2025] LLMを使った業務AHCの上⼿な解き⽅
terryu16
6
1.1k
Combinatorial Interview Problems with Backtracking Solutions - From Imperative Procedural Programming to Declarative Functional Programming - Part 2
philipschwarz
PRO
0
140
なぜSQLはAIぽく見えるのか/why does SQL look AI like
florets1
0
270
まだ間に合う!Claude Code元年をふりかえる
nogu66
5
940
Automatic Grammar Agreementと Markdown Extended Attributes について
kishikawakatsumi
0
130
2年のAppleウォレットパス開発の振り返り
muno92
PRO
0
180
AgentCoreとHuman in the Loop
har1101
5
170
Claude Codeの「Compacting Conversation」を体感50%減! CLAUDE.md + 8 Skills で挑むコンテキスト管理術
kmurahama
1
760
Featured
See All Featured
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
19k
Odyssey Design
rkendrick25
PRO
0
460
Speed Design
sergeychernyshev
33
1.5k
Why Our Code Smells
bkeepers
PRO
340
58k
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
0
410
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
1.8k
Evolving SEO for Evolving Search Engines
ryanjones
0
100
A Tale of Four Properties
chriscoyier
162
24k
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
120
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
0
120
エンジニアに許された特別な時間の終わり
watany
106
230k
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
0
180
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