Sruj
Sruj

Reputation: 1207

How to list all Symfony route names with controller class path?

I know there is php app/console debug:router --show-controllers but it only show Controller::Action. Is it possible to list route names with controller class path ? enter image description here

Upvotes: 3

Views: 1375

Answers (1)

Dmitry Malyshenko
Dmitry Malyshenko

Reputation: 3051

I'm afraid there is no really smart method to see all classes associated to controllers.

Profiler is listening FilterControllerEvent to find out a class, and it must be application to be run to fire this event.

But. Controllers you see after running php app/console debug:router --show-controllers has two formats: either something like VendorNameBundle:Task:get (and in this case it's obvious where to find controller, in VendorBundle/Controllers/TaskController) or it's, like in your case, is service's name. And in this case you can find a class by running

 php app/console debug:container | grep sylius.controller.product 

Upvotes: 3

Related Questions