bugfix(state-request-format): source request format from request attribute

 Make sure the _format param is used instead of request->getRequestFormat by setting the request format
 to html and the _format param to the expected value. This handling of setting the request format
 is causing issues with legacy projects.

 Related change to symfony code base can be found linked in
 [in a bug report](https://github.com/symfony/symfony/issues/8787) on symfony git repo