Skip to content

Commit 91469ad

Browse files
Adding information on the container:debug command
1 parent 4eb160b commit 91469ad

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

book/service_container.rst

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -925,6 +925,29 @@ additional arguments (beyond just the ``name`` parameter).
925925
For a list of all the tags available in the core Symfony Framework, check
926926
out :doc:`/reference/dic_tags`.
927927

928+
Debugging Services
929+
------------------
930+
931+
You can find out what services are registered with the container using the
932+
console, to list the services by id and which class they are:
933+
934+
.. code-block:: bash
935+
936+
$ php app/console container:debug
937+
938+
By default only public services are shown, you can also view private services:
939+
940+
.. code-block:: bash
941+
942+
$ php app/console container:debug --show-private
943+
944+
You can get more detailed information about a particular service by specifying
945+
its id:
946+
947+
.. code-block:: bash
948+
949+
$ php app/console container:debug my_mailer
950+
928951
Learn more
929952
----------
930953

0 commit comments

Comments
 (0)