10000 Added a note about inlined private services by javiereguiluz · Pull Request #3727 · symfony/symfony-docs · GitHub
[go: up one dir, main page]

Skip to content

Added a note about inlined private services #3727

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions book/service_container.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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:`Inline Private Services <inlined-private-services>`
for more details.

You can get more detailed information about a particular service by specifying
its id:

Expand Down
2 changes: 2 additions & 0 deletions components/dependency_injection/advanced.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
0