File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
cookbook/service_container Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -98,6 +98,9 @@ Each scenario is detailed in the following sections.
98
98
Using a synchronized Service
99
99
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
100
100
101
+ .. versionadded :: 2.3
102
+ Synchronized services are new in Symfony 2.3.
103
+
101
104
Injecting the container or setting your service to a narrower scope have
102
105
drawbacks. For synchronized services (like the ``request ``), using setter
103
106
injection is the best option as it has no drawbacks and everything works
@@ -127,7 +130,7 @@ without any special code in your service or in your definition::
127
130
}
128
131
}
129
132
130
- Whenever the ``request `` is entered or leaved , the service container will
133
+ Whenever the ``request `` scope is entered or left , the service container will
131
134
automatically call the ``setRequest() `` method with the current ``request ``
132
135
instance.
133
136
@@ -210,7 +213,7 @@ your code. This should also be taken into account when declaring your service:
210
213
Changing the Scope of your Service
211
214
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
212
215
213
- Changing the scope of a service should be done set in its definition:
216
+ Changing the scope of a service should be done in its definition:
214
217
215
218
.. configuration-block ::
216
219
You can’t perform that action at this time.
0 commit comments