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
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
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
セグメントとターゲットを意識するプロポーザルの書き方 〜採択の鍵は、誰に刺すかを見極めるマーケティング戦略にある〜
m3m0r7
PRO
0
610
Liberating Ruby's Parser from Lexer Hacks
ydah
2
2.3k
「話せることがない」を乗り越える 〜日常業務から登壇テーマをつくる思考法〜
shoheimitani
4
890
Claude CodeでETLジョブ実行テストを自動化してみた
yoshikikasama
0
990
🦞OpenClaw works with AWS
licux
1
290
The Monolith Strikes Back: Why AI Agents ❤️ Rails Monoliths
serradura
0
360
UIの境界線をデザインする | React Tokyo #15 メイントーク
sasagar
2
390
Programming with a DJ Controller — not vibe coding
m_seki
3
480
From Formal Specification to Property Based Test
ohbarye
0
440
The Less-Told Story of Socket Timeouts
coe401_
3
690
ハーネスエンジニアリングとは?
kinopeee
13
6.3k
Terraform言語の静的解析 / static analysis of Terraform language
wata727
1
120
Featured
See All Featured
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.3k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8.1k
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
170
Fashionably flexible responsive web design (full day workshop)
malarkey
408
66k
Thoughts on Productivity
jonyablonski
76
5.1k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
380
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
540
Code Reviewing Like a Champion
maltzj
528
40k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
1
730
KATA
mclloyd
PRO
35
15k
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