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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
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
300
Avoiding the mud
richardmiller
22
11k
better searching with elasticsearch - PHPConfPL
richardmiller
2
520
better searching with elasticsearch
richardmiller
2
300
Avoiding the mud - Symfony Live London
richardmiller
7
780
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
Python’s True Superpower
hynek
0
190
CSC307 Lecture 09
javiergs
PRO
1
850
go directiveを最新にしすぎないで欲しい話──あるいは、Go 1.26からgo mod initで作られるgo directiveの値が変わる話 / Go 1.26 リリースパーティ
arthur1
2
400
JPUG勉強会 OSSデータベースの内部構造を理解しよう
oga5
2
220
ご飯食べながらエージェントが開発できる。そう、Agentic Engineeringならね。
yokomachi
1
270
社内規程RAGの精度を73.3% → 100%に改善した話
oharu121
11
5.3k
ふん…おもしれぇ Parser。RubyKaigi 行ってやるぜ
aki_pin0
0
120
AHC061解説
shun_pi
0
260
TROCCOで実現するkintone+BigQueryによるオペレーション改善
ssxota
0
110
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
100
AI時代のキャリアプラン「技術の引力」からの脱出と「問い」へのいざない / tech-gravity
minodriven
22
8.1k
Claude Codeセッション現状確認 2026福岡 / fukuoka-aicoding-00-beacon
monochromegane
3
350
Featured
See All Featured
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
130
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
1
140
Git: the NoSQL Database
bkeepers
PRO
432
66k
Believing is Seeing
oripsolob
1
68
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.6k
Designing Experiences People Love
moore
144
24k
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
140
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.3k
How to build a perfect <img>
jonoalderson
1
5.2k
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
90
Product Roadmaps are Hard
iamctodd
PRO
55
12k
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
2
65
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