Skip to content

Commit 8292f0d

Browse files
committed
Allow \Throwable $previous everywhere
1 parent 93782e0 commit 8292f0d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Controller/ControllerTrait.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ protected function stream(string $view, array $parameters = [], StreamedResponse
288288
*
289289
* @final
290290
*/
291-
protected function createNotFoundException(string $message = 'Not Found', \Exception $previous = null): NotFoundHttpException
291+
protected function createNotFoundException(string $message = 'Not Found', \Throwable $previous = null): NotFoundHttpException
292292
{
293293
return new NotFoundHttpException($message, $previous);
294294
}
@@ -304,7 +304,7 @@ protected function createNotFoundException(string $message = 'Not Found', \Excep
304304
*
305305
* @final
306306
*/
307-
protected function createAccessDeniedException(string $message = 'Access Denied.', \Exception $previous = null): AccessDeniedException
307+
protected function createAccessDeniedException(string $message = 'Access Denied.', \Throwable $previous = null): AccessDeniedException
308308
{
309309
if (!class_exists(AccessDeniedException::class)) {
310310
throw new \LogicException('You can not use the "createAccessDeniedException" method if the Security component is not available. Try running "composer require symfony/security-bundle".');

0 commit comments

Comments
 (0)