File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff 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.
You can’t perform that action at this time.
0 commit comments