8000 minor #9775 Document the hidden services and update debug:container d… · symfony/symfony-docs@2cb5242 · GitHub
[go: up one dir, main page]

Skip to content

Commit 2cb5242

Browse files
committed
minor #9775 Document the hidden services and update debug:container docs (javiereguiluz)
This PR was squashed before being merged into the 4.1 branch (closes #9775). Discussion ---------- Document the hidden services and update debug:container docs This fixes #9658. Commits ------- 8010808 Document the hidden services and update debug:container docs
2 parents 3cd9ccd + 8010808 commit 2cb5242

File tree

2 files changed

+9
-12
lines changed

2 files changed

+9
-12
lines changed

service_container.rst

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -571,6 +571,9 @@ But, you can control this and pass in a different logger:
571571
# explicitly configure the service
572572
App\Service\MessageGenerator:
573573
arguments:
574+
# the '@' symbol is important: that's what tells the container
575+
# you want to pass the *service* whose id is 'monolog.logger.request',
576+
# and not just the *string* 'monolog.logger.request'
574577
$logger: '@monolog.logger.request'
575578
576579
.. code-block:: xml
@@ -612,13 +615,7 @@ For a full list of *all* possible services in the container, run:
612615

613616
.. code-block:: terminal
614617
615-
php bin/console debug:container --show-private
616-
617-
.. tip::
618-
619-
The ``@`` symbol is important: that's what tells the container you want to pass
620-
the *service* whose id is ``monolog.logger.request``, and not just the *string*
621-
``monolog.logger.request``.
618+
$ php bin/console debug:container
622619
623620
.. _services-binding:
624621

service_container/debug.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,17 @@ How to Debug the Service Container & List Services
66
==================================================
77

88
You can find out what services are registered with the container using the
9-
console. To show all services and the class for each service, run:
9+
console. To show all services (public and private) and their PHP classes, run:
1010

1111
.. code-block:: terminal
1212
1313
$ php bin/console debug:container
1414
15-
By default, only public services are shown, but you can also view private services:
15+
# add this option to display "hidden services" too (those whose ID starts with a dot)
16+
$ php bin/console debug:container --show-hidden
1617
17-
.. code-block:: terminal
18-
19-
$ php bin/console debug:container --show-private
18+
.. versionadded:: 4.1
19+
Hidden services and the ``--show-hidden`` option were introduced in Symfony 4.1.
2020

2121
To see a list of all of the available types that can be used for autowiring, run:
2222

0 commit comments

Comments
 (0)
0