[Debug] Deprecate ExceptionHandler::createResponse
This commit is contained in:
parent
68fdb02485
commit
a4d2d31f1b
@ -164,6 +164,7 @@ class ExceptionHandler
|
|||||||
$response = $this->createResponse($exception);
|
$response = $this->createResponse($exception);
|
||||||
$response->sendHeaders();
|
$response->sendHeaders();
|
||||||
$response->sendContent();
|
$response->sendContent();
|
||||||
|
@trigger_error(sprintf("The %s::createResponse method is deprecated since 2.8 and won't be called anymore when handling an exception in 3.0.", $reflector->class), E_USER_DEPRECATED);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -202,9 +203,13 @@ class ExceptionHandler
|
|||||||
* @param \Exception|FlattenException $exception An \Exception instance
|
* @param \Exception|FlattenException $exception An \Exception instance
|
||||||
*
|
*
|
||||||
* @return Response A Response instance
|
* @return Response A Response instance
|
||||||
|
*
|
||||||
|
* @deprecated since 2.8, to be removed in 3.0.
|
||||||
*/
|
*/
|
||||||
public function createResponse($exception)
|
public function createResponse($exception)
|
||||||
{
|
{
|
||||||
|
@trigger_error('The '.__METHOD__.' method is deprecated since version 2.8 and will be removed in 3.0.', E_USER_DEPRECATED);
|
||||||
|
|
||||||
if (!$exception instanceof FlattenException) {
|
if (!$exception instanceof FlattenException) {
|
||||||
$exception = FlattenException::create($exception);
|
$exception = FlattenException::create($exception);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user