In Symfony 1.x if you wanted to output some text or json or something else and not use a template for that action you would just do the following:
However, in Symfony2 that isn’t working anymore. Every action must return a response, so you can do the following:
Thanks, but I’m getting this error when I call the action:
You have requested a non-existent service “response”.
Javi
Yes, some things changed from beta version of Symfony2. I updated the code to fit the new stable version.
Cool 🙂