Skip to content

Updated the output of debug:autowiring #10906

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

Merged
merged 1 commit into from
Jan 22, 2019
Merged
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
25 changes: 15 additions & 10 deletions quick_tour/the_architecture.rst
Original file line number Diff line number Diff line change
Expand Up @@ -63,16 +63,21 @@ What other possible classes or interfaces could you use? Find out by running:

$ php bin/console debug:autowiring

=============================================================== =====================================
Class/Interface Type Alias Service ID
=============================================================== =====================================
``Psr\Cache\CacheItemPoolInterface`` alias for "cache.app.recorder"
``Psr\Log\LoggerInterface`` alias for "monolog.logger"
``Symfony\Component\EventDispatcher\EventDispatcherInterface`` alias for "debug.event_dispatcher"
``Symfony\Component\HttpFoundation\RequestStack`` alias for "request_stack"
``Symfony\Component\HttpFoundation\Session\SessionInterface`` alias for "session"
``Symfony\Component\Routing\RouterInterface`` alias for "router.default"
=============================================================== =====================================
# this is just a *small* sample of the output...

Describes a logger instance.
Psr\Log\LoggerInterface (monolog.logger)

Request stack that controls the lifecycle of requests.
Symfony\Component\HttpFoundation\RequestStack (request_stack)

Interface for the session.
Symfony\Component\HttpFoundation\Session\SessionInterface (session)

RouterInterface is the interface that all Router classes must implement.
Symfony\Component\Routing\RouterInterface (router.default)

[...]

This is just a short summary of the full list! And as you add more packages, this
list of tools will grow!
Expand Down
53 changes: 30 additions & 23 deletions service_container.rst
Original file line number Diff line number Diff line change
Expand Up @@ -49,17 +49,21 @@ What other services are available? Find out by running:

$ php bin/console debug:autowiring

# this is just a *small* sample of the output...
========================================================== ==================================
Class/Interface Type Alias Service ID
========================================================== ==================================
Psr\Cache\CacheItemPoolInterface alias for "cache.app.recorder"
Psr\Log\LoggerInterface alias for "monolog.logger"
Symfony\Component\EventDispatcher\EventDispatcherInterface alias for "debug.event_dispatcher"
Symfony\Component\HttpFoundation\RequestStack alias for "request_stack"
Symfony\Component\HttpFoundation\Session\SessionInterface alias for "session"
Symfony\Component\Routing\RouterInterface alias for "router.default"
========================================================== ==================================
# this is just a *small* sample of the output...

Describes a logger instance.
Psr\Log\LoggerInterface (monolog.logger)

Request stack that controls the lifecycle of requests.
Symfony\Component\HttpFoundation\RequestStack (request_stack)

Interface for the session.
Symfony\Component\HttpFoundation\Session\SessionInterface (session)

RouterInterface is the interface that all Router classes must implement.
Symfony\Component\Routing\RouterInterface (router.default)

[...]

When you use these type-hints in your controller methods or inside your
:ref:`own services <service-container-creating-service>`, Symfony will automatically
Expand Down Expand Up @@ -261,18 +265,21 @@ type-hints by running:

$ php bin/console debug:autowiring

This command is your best friend. This is a small subset of the output:

=============================================================== =====================================
Class/Interface Type Alias Service ID
=============================================================== =====================================
``Psr\Cache\CacheItemPoolInterface`` alias for "cache.app.recorder"
``Psr\Log\LoggerInterface`` alias for "monolog.logger"
``Symfony\Component\EventDispatcher\EventDispatcherInterface`` alias for "debug.event_dispatcher"
``Symfony\Component\HttpFoundation\RequestStack`` alias for "request_stack"
``Symfony\Component\HttpFoundation\Session\SessionInterface`` alias for "session"
``Symfony\Component\Routing\RouterInterface`` alias for "router.default"
=============================================================== =====================================
# this is just a *small* sample of the output...

Describes a logger instance.
Psr\Log\LoggerInterface (monolog.logger)

Request stack that controls the lifecycle of requests.
Symfony\Component\HttpFoundation\RequestStack (request_stack)

Interface for the session.
Symfony\Component\HttpFoundation\Session\SessionInterface (session)

RouterInterface is the interface that all Router classes must implement.
Symfony\Component\Routing\RouterInterface (router.default)

[...]

Handling Multiple Services
~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down