From 04cb9d48e4492d85394ad76c720202b86aa96794 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Fri, 28 Mar 2014 09:08:09 +0100 Subject: [PATCH 1/3] Added a note about inlined private services --- book/service_container.rst | 7 +++++++ components/dependency_injection/advanced.rst | 2 ++ 2 files changed, 9 insertions(+) diff --git a/book/service_container.rst b/book/service_container.rst index a036a6cae41..a26b8f447c1 100644 --- a/book/service_container.rst +++ b/book/service_container.rst @@ -1001,6 +1001,13 @@ By default only public services are shown, but you can also view private service $ php app/console container:debug --show-private +.. note:: + + If a private service is only used as an argument to just one other service, + it won't be displayed by the ``container:debug`` command, even when using + the ``--show-private`` option. See :ref:`inlined-private-services` for a + more detailed explanation. + You can get more detailed information about a particular service by specifying its id: diff --git a/components/dependency_injection/advanced.rst b/components/dependency_injection/advanced.rst index 7c139a7b734..db5fa9a04b2 100644 --- a/components/dependency_injection/advanced.rst +++ b/components/dependency_injection/advanced.rst @@ -18,6 +18,8 @@ However, there are use-cases when you don't want a service to be public. This is common when a service is only defined because it could be used as an argument for another service. +.. _inlined-private-services: + .. note:: If you use a private service as an argument to only one other service, From 835b52f9616f19d16444d6efa98f0df84d43d17c Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Fri, 28 Mar 2014 09:47:09 +0100 Subject: [PATCH 2/3] Emphasized the fact that this only applies when the private service is used as argument for a single service --- book/service_container.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/book/service_container.rst b/book/service_container.rst index a26b8f447c1..8ee2d96b232 100644 --- a/book/service_container.rst +++ b/book/service_container.rst @@ -1003,7 +1003,7 @@ By default only public services are shown, but you can also view private service .. note:: - If a private service is only used as an argument to just one other service, + If a private service is only used as an argument to just *one* other service, it won't be displayed by the ``container:debug`` command, even when using the ``--show-private`` option. See :ref:`inlined-private-services` for a more detailed explanation. From 15a7be00d10af1540775adf52de1e3d4cc829e39 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Mon, 31 Mar 2014 12:02:12 +0200 Subject: [PATCH 3/3] [book] [service_container] added the title of a cross reference --- book/service_container.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/book/service_container.rst b/book/service_container.rst index 8ee2d96b232..29248f6d60b 100644 --- a/book/service_container.rst +++ b/book/service_container.rst @@ -1005,8 +1005,8 @@ By default only public services are shown, but you can also view private service If a private service is only used as an argument to just *one* other service, it won't be displayed by the ``container:debug`` command, even when using - the ``--show-private`` option. See :ref:`inlined-private-services` for a - more detailed explanation. + the ``--show-private`` option. See :ref:`Inline Private Services ` + for more details. You can get more detailed information about a particular service by specifying its id: