8000 [Debug] Deprecate ExceptionHandler::createResponse · symfony/symfony@a4d2d31 · GitHub
[go: up one dir, main page]

Skip to content

Commit a4d2d31

Browse files
[Debug] Deprecate ExceptionHandler::createResponse
1 parent 68fdb02 commit a4d2d31

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/Symfony/Component/Debug/ExceptionHandler.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,7 @@ private function failSafeHandle(\Exception $exception)
164164
$response = $this->createResponse($exception);
165165
$response->sendHeaders();
166166
$response->sendContent();
167+
@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);
167168

168169
return;
169170
}
@@ -202,9 +203,13 @@ public function sendPhpResponse($exception)
202203
* @param \Exception|FlattenException $exception An \Exception instance
203204
*
204205
* @return Response A Response instance
206+
*
207+
* @deprecated since 2.8, to be removed in 3.0.
205208
*/
206209
public function createResponse($exception)
207210
{
211+
@trigger_error('The '.__METHOD__.' method is deprecated since version 2.8 and will be removed in 3.0.', E_USER_DEPRECATED);
212+
208213
if (!$exception instanceof FlattenException) {
209214
$exception = FlattenException::create($exception);
210215
}

0 commit comments

Comments
 (0)
0