You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (class_exists('Symfony\Component\HttpFoundation\Response', false)) {
159
+
if (class_exists('Symfony\Component\HttpFoundation\Response', false)
160
+
&& __CLASS__ !== get_class($this)
161
+
&& ($reflector = new \ReflectionMethod($this, 'createResponse'))
162
+
&& __CLASS__ !== $reflector->class
163
+
) {
163
164
$response = $this->createResponse($exception);
164
165
$response->sendHeaders();
165
166
$response->sendContent();
166
-
} else {
167
-
$this->sendPhpResponse($exception);
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);
168
+
169
+
return;
168
170
}
171
+
172
+
$this->sendPhpResponse($exception);
169
173
}
170
174
171
175
/**
@@ -199,9 +203,13 @@ public function sendPhpResponse($exception)
199
203
* @param \Exception|FlattenException $exception An \Exception instance
200
204
*
201
205
* @return Response A Response instance
206
+
*
207
+
* @deprecated since 2.8, to be removed in 3.0.
202
208
*/
203
209
publicfunctioncreateResponse($exception)
204
210
{
211
+
@trigger_error('The '.__METHOD__.' method is deprecated since version 2.8 and will be removed in 3.0.', E_USER_DEPRECATED);
0 commit comments