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
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
CSC307 Lecture 14
javiergs
PRO
0
440
「やめとこ」がなくなった — 1月にZennを始めて22本書いた AI共創開発のリアル
atani14
0
330
登壇資料を作る時に意識していること #登壇資料_findy
konifar
4
2k
RubyとGoでゼロから作る証券システム: 高信頼性が求められるシステムのコードの外側にある設計と運用のリアル
free_world21
0
130
Oxlint JS plugins
kazupon
1
1.1k
NOT A HOTEL - 建築や人と融合し、自由を創り出すソフトウェア
not_a_hokuts
2
490
Swift ConcurrencyでよりSwiftyに
yuukiw00w
0
220
CSC307 Lecture 12
javiergs
PRO
0
450
クライアントワークでSREをするということ。あるいは事業会社におけるSREと同じこと・違うこと
nnaka2992
1
230
AIに仕事を丸投げしたら、本当に楽になれるのか
dip_tech
PRO
0
170
Head of Engineeringが現場で回した生産性向上施策 2025→2026
gessy0129
0
200
猫の手も借りたい!ので AIエージェント猫を作って社内に放した話 Claude Code × Container Lambda の Slack Bot "DevNeko"
naramomi7
0
220
Featured
See All Featured
Discover your Explorer Soul
emna__ayadi
2
1.1k
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
400
Bash Introduction
62gerente
615
210k
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.2k
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
0
2.4k
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
1
850
Test your architecture with Archunit
thirion
1
2.2k
Navigating Weather and Climate Data
rabernat
0
130
[SF Ruby Conf 2025] Rails X
palkan
2
800
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
5.9k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.1k
Optimizing for Happiness
mojombo
379
71k
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