Defining Symfony 2 controllers in two ways

If you start with Symfony 2 using the quick tour, you might assume there is only one way of creating a controller: by extending Symfony\Bundle\FrameworkBundle\Controller\Controller. If you follow the more in depth book you might notice a tip to a second way of creating a controller: as a service. Lately I’ve been exclusively creating my […]