Skip to content

Commit 7b0bfac

Browse files
committed
change note to caution and simplify text
1 parent d3cea66 commit 7b0bfac

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

book/service_container.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -231,13 +231,13 @@ looks up the value of each parameter and uses it in the service definition.
231231
232232
<argument type="string">http://symfony.com/?foo=%%s&bar=%%d</argument>
233233
234-
.. note::
234+
.. caution::
235235

236-
It can be useful to pass other services in as arguments to your custom service.
237-
For example, you may want to pass in the ``request`` service as an argument.
238-
In these cases, you may receive a ``ScopeWideningInjectionException``.
239-
To understand this problem better and learn how to solve it, refer to
240-
the cookbook article :doc:`/cookbook/service_container/scopes`.
236+
You may receive a
237+
:class:`Symfony\\Component\\DependencyInjection\\Exception\\ScopeWideningInjectionException`
238+
when passing the ``request`` service as an argument. To understand this
239+
problem better and learn how to solve it, refer to the cookbook article
240+
:doc:`/cookbook/service_container/scopes`.
241241

242242
The purpose of parameters is to feed information into services. Of course
243243
there was nothing wrong with defining the service without using any parameters.

0 commit comments

Comments
 (0)