Skip to content

Commit 35fff77

Browse files
committed
[#2343] Minor tweaks to synchronized services section
1 parent 2821a55 commit 35fff77

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

cookbook/service_container/scopes.rst

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,9 @@ Each scenario is detailed in the following sections.
9898
Using a synchronized Service
9999
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
100100

101+
.. versionadded:: 2.3
102+
Synchronized services are new in Symfony 2.3.
103+
101104
Injecting the container or setting your service to a narrower scope have
102105
drawbacks. For synchronized services (like the ``request``), using setter
103106
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::
127130
}
128131
}
129132

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
131134
automatically call the ``setRequest()`` method with the current ``request``
132135
instance.
133136

@@ -210,7 +213,7 @@ your code. This should also be taken into account when declaring your service:
210213
Changing the Scope of your Service
211214
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
212215

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:
214217

215218
.. configuration-block::
216219

0 commit comments

Comments
 (0)