title: Symfony 4 print all routes
body: <p>I'm trying to set up an index page which would print out all the endpoints in the API (using Symfony 4).</p>
  
  <p>In Symfony 2 you could get a router and via the container and then the collection of the routes. But it seems that you don't have access to the container right out of the box in Symfony 4.</p>
  
  <p>Google search doesn't seem to yield precise result I'm looking for. Is there an alternative way to do so in Symfony 4 or something alike?</p>