Warning: You are browsing the documentation for Symfony 3.1, which is no longer maintained.
Read the updated version of this page for Symfony 5.3 (the current stable version).
You can find out what services are registered with the container using the console. To show all services and the class for each service, run:
$ php bin/console debug:container
By default, only public services are shown, but you can also view private services:
$ php bin/console debug:container --show-private
If a private service is only used as an argument to just one other service,
it won't be displayed by the
debug:container command, even when using
--show-private option. See Inline Private Services
for more details.
You can get more detailed information about a particular service by specifying its id:
$ php bin/console debug:container app.mailer