8000 Merge pull request #1646 from bamarni/patch-2 · smoya/symfony-docs@a708102 · GitHub
[go: up one dir, main page]

Skip to content

Commit a708102

Browse files
committed
Merge pull request symfony#1646 from bamarni/patch-2
fixed a note about private services
2 parents d0b5042 + 16d38ff commit a708102

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

components/dependency_injection/advanced.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ argument for another service.
2020

2121
.. note::
2222

23-
If you use a private service as an argument to more than one other service,
24-
this will result in two different instances being used as the instantiation
25-
of the private service is done inline (e.g. ``new PrivateFooBar()``).
23+
If you use a private service as an argument to only one other service,
24+
this will result in an inlined instantiation (e.g. ``new PrivateFooBar()``)
25+
inside this other service, making it publicly unavailable at runtime.
2626

2727
Simply said: A service will be private when you do not want to access it
2828
directly from your code.

0 commit comments

Comments
 (0)
0