This repository was archived by the owner on Jul 4, 2018. It is now read-only.

Description
Commit symfony/http-kernel@538a38c introduced a BC break.
In a JSONP application context, we could want a 200 response, whatever happens (like in the foursquare API see https://developer.foursquare.com/overview/responses), let's assume we have a Silex error handler like this :
<?php
$app->error(function ($e, $code) use ($app) {
if ($app['request']->getRequestFormat() == 'json') {
$datas = array(
'success' => false
, 'message' => $e->getMessage()
);
return $app->json($datas);
}
});
Before the mentionned commit, everything was OK ; right now it is impossible to customize the error handler as the returned response is tweaked in the HttpKernel before being sent.
I was questionning about posting this problem here or at symfony/symfony. Let me know if you want to move it there.