FOS rest bundle: unable to find template FOS rest bundle: unable to find template symfony symfony

FOS rest bundle: unable to find template


I managed to resolve this issue by setting the listener explicitly to false:

fos_rest:    format_listener: false

EDIT

This also works:

fos_rest:    format_listener:        prefer_extension: false        default_priorities:            - json


For FOSRestBundle version 2.0 the config should be

fos_rest:    format_listener:        rules:            prefer_extension: false            fallback_format: json


(For reference) If One is testing with a rest client or manually be sure to set the header in your request:Accept:application/json

Because fosRestBundle tries to determine the proper response type from the headers in the request.