Skip to content

Commit 3e30de2

Browse files
committed
fix(info): fix on advantages
1 parent 4b22d71 commit 3e30de2

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

service_container/injection_types.rst

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -328,11 +328,13 @@ so, what are the advantages?
328328
* Your service becomes immutable, as the container will return a new object,
329329
the initial service stays clean and unchanged.
330330

331-
* You can easily change the injected service as long as it respect the interface
331+
* You can easily change the injected service as long as it respect the interface/type
332332
asked by the initial service.
333333

334334
* It allow you to get rid of factory usages which can lead a more complex code
335335

336-
The disadvantages of this approach are:
336+
* As the dependency is optional, you can easily decide to receive the service
337+
without using the "with" method.
337338

338-
*
339+
* As the method automatically receive and set the attribute value,
340+
you couldn't obtain a new service without this dependency.

0 commit comments

Comments
 (0)