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
280
Avoiding the mud
richardmiller
22
11k
better searching with elasticsearch - PHPConfPL
richardmiller
2
510
better searching with elasticsearch
richardmiller
2
290
Avoiding the mud - Symfony Live London
richardmiller
7
760
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
自動テストを活かすためのテスト分析・テスト設計の進め方/JaSST25 Shikoku
goyoki
3
660
AsyncSequenceとAsyncStreamのプロポーザルを全部読む!!
s_shimotori
1
280
Kotlinで実装するCPU/GPU 「協調的」パフォーマンス管理
matuyuhi
0
410
CloudNative Days Winter 2025: 一週間で作る低レイヤコンテナランタイム
ternbusty
4
830
ノーコードからの脱出 -地獄のデスロード- / Escape from Base44
keisuke69
0
710
2026年向け会社紹介資料
misu
0
190
Building AI with AI
inesmontani
PRO
0
190
Agentに至る道 〜なぜLLMは自動でコードを書けるようになったのか〜
mackee
5
1.4k
Claude Code on the Web を超える!? Codex Cloud の実践テク5選
sunagaku
0
550
AI POSにおけるLLM Observability基盤の導入 ― サイバーエージェントDXインターン成果報告
hekuchan
0
550
Core MIDI を勉強して作曲用の電子ピアノ作ってみた!
hypebeans
0
110
Tangible Code
chobishiba
3
560
Featured
See All Featured
Gamification - CAS2011
davidbonilla
81
5.5k
Build your cross-platform service in a week with App Engine
jlugia
234
18k
Git: the NoSQL Database
bkeepers
PRO
432
66k
What's in a price? How to price your products and services
michaelherold
246
12k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
Stop Working from a Prison Cell
hatefulcrawdad
272
21k
[RailsConf 2023] Rails as a piece of cake
palkan
57
6.1k
Building a Scalable Design System with Sketch
lauravandoore
463
33k
Being A Developer After 40
akosma
91
590k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
2.9k
A Modern Web Designer's Workflow
chriscoyier
697
190k
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