From 2913a55d87461fabe94907c5728d7a9451bcae80 Mon Sep 17 00:00:00 2001 From: Graham Campbell Date: Mon, 25 Nov 2019 14:46:29 +0000 Subject: [PATCH] [7.x] Switch to Symfony 5 (#5157) * Update exception handler * Explictly specify 'lax' same site config * Use the null secure option for session cookies --- app/Exceptions/Handler.php | 10 +++++----- config/session.php | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/app/Exceptions/Handler.php b/app/Exceptions/Handler.php index 043cad6b..10d80380 100644 --- a/app/Exceptions/Handler.php +++ b/app/Exceptions/Handler.php @@ -2,8 +2,8 @@ namespace App\Exceptions; -use Exception; use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler; +use Throwable; class Handler extends ExceptionHandler { @@ -29,10 +29,10 @@ class Handler extends ExceptionHandler /** * Report or log an exception. * - * @param \Exception $exception + * @param \Throwable $exception * @return void */ - public function report(Exception $exception) + public function report(Throwable $exception) { parent::report($exception); } @@ -41,10 +41,10 @@ public function report(Exception $exception) * Render an exception into an HTTP response. * * @param \Illuminate\Http\Request $request - * @param \Exception $exception + * @param \Throwable $exception * @return \Illuminate\Http\Response */ - public function render($request, Exception $exception) + public function render($request, Throwable $exception) { return parent::render($request, $exception); } diff --git a/config/session.php b/config/session.php index fbb9b4d7..bdfc40f6 100644 --- a/config/session.php +++ b/config/session.php @@ -166,7 +166,7 @@ | */ - 'secure' => env('SESSION_SECURE_COOKIE', false), + 'secure' => env('SESSION_SECURE_COOKIE', null), /* |-------------------------------------------------------------------------- @@ -194,6 +194,6 @@ | */ - 'same_site' => null, + 'same_site' => 'lax', ];