Skip to content

Commit 5907a00

Browse files
committed
Fixes after great review
1 parent a057ac8 commit 5907a00

File tree

4 files changed

+15
-13
lines changed

4 files changed

+15
-13
lines changed

service_container/definitions.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ Working with Container Service Definitions
55
==========================================
66

77
Service definitions are the instructions describing how the container should
8-
build a service. They are not the actual services used by your applications
8+
build a service. They are not the actual services used by your applications.
9+
The container will create the actual class instances based on the configuration
10+
in the definition.
911

1012
Getting and Setting Service Definitions
1113
---------------------------------------

service_container/service_decoration.rst

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ How to Decorating Services
55
==========================
66

77
When overriding an existing definition (e.g. when applying the `Decorator pattern`_),
8-
the old service is lost:
8+
the original service is lost:
99

1010
.. configuration-block::
1111

@@ -15,8 +15,8 @@ the old service is lost:
1515
app.mailer:
1616
class: AppBundle\Mailer
1717
18-
# this is going to replace the old app.mailer definition with the
19-
# new one, the old definition is lost
18+
# this replaces the old app.mailer definition with the new one, the
19+
# old definition is lost
2020
app.mailer:
2121
class AppBundle\DecoratingMailer
2222
@@ -31,8 +31,8 @@ the old service is lost:
3131
3232
<service id="app.mailer" class="AppBundle\Mailer" />
3333
34-
<!-- this is going to replace the old app.mailer definition
35-
with the new one, the old definition is lost -->
34+
<!-- this replaces the old app.mailer definition with the new
35+
one, the old definition is lost -->
3636
<service id="app.mailer" class="AppBundle\DecoratingMailer" />
3737
3838
</service>
@@ -42,8 +42,8 @@ the old service is lost:
4242
4343
$container->register('mailer', 'AppBundle\Mailer');
4444
45-
// this is going to replace the old app.mailer definition with the new
46-
// one, the old definition is lost
45+
// this replaces the old app.mailer definition with the new one, the
46+
// old definition is lost
4747
$container->register('mailer', 'AppBundle\DecoratingMailer');
4848
4949
Most of the time, that's exactly what you want to do. But sometimes,
@@ -97,8 +97,8 @@ a reference of the old one as ``app.decorating_mailer.inner``:
9797
->setPublic(false)
9898
;
9999
100-
Here is what's going on here: the decorates option tells the container that the
101-
``app.decorating_mailer`` service should replace the ``app.mailer`` service. By
100+
Here is what's going on here: the ``decorates`` option tells the container that
101+
the ``app.decorating_mailer`` service replaces the ``app.mailer`` service. By
102102
convention, the old ``app.mailer`` service is renamed to
103103
``app.decorating_mailer.inner``, so you can inject it into your new service.
104104

service_container/synthetic_services.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
How to Inject Instances into the Container
55
------------------------------------------
66

7-
When using the container in your application, you sometimes need to inject
8-
an instance instead of configuring the container to create a new instance.
7+
In some applications, you may need to inject a class instance as service,
8+
instead of configuring the container to create a new instance.
99

1010
For instance, the ``kernel`` service in Symfony is injected into the container
1111
from within the ``Kernel`` class::

service_container/tags.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ parameter).
6969
Creating custom Tags
7070
--------------------
7171

72-
Tags on there own don't actually alter the functionality of your services in
72+
Tags on their own don't actually alter the functionality of your services in
7373
any way. But if you choose to, you can ask a container builder for a list of
7474
all services that were tagged with some specific tag. This is useful in
7575
compiler passes where you can find these services and use or modify them in

0 commit comments

Comments
 (0)