Upgrade to Laravel 10

This commit is contained in:
Jonny Barnes 2023-02-18 09:34:57 +00:00
parent c4d7dc31d5
commit 16b120bc73
Signed by: jonny
SSH key fingerprint: SHA256:CTuSlns5U7qlD9jqHvtnVmfYV3Zwl2Z7WnJ4/dqOaL8
142 changed files with 1676 additions and 2019 deletions

View file

@ -21,46 +21,34 @@ class Handler extends ExceptionHandler
/**
* A list of the exception types that are not reported.
*
* @var array
* @var array<int, class-string<\Throwable>>
*/
protected $dontReport = [
NotFoundHttpException::class,
ModelNotFoundException::class,
];
/**
* A list of the inputs that are never flashed for validation exceptions.
*
* @var array
*/
protected $dontFlash = [
'password',
'password_confirmation',
];
/**
* Report or log an exception.
*
* This is a great spot to send exceptions to Sentry, Bugsnag, etc.
*
* @return void
*
* @throws Exception
* @throws Throwable
*/
public function report(Throwable $throwable)
public function report(Throwable $e): void
{
parent::report($throwable);
parent::report($e);
if (config('logging.slack') && $this->shouldReport($throwable)) {
if (config('logging.slack') && $this->shouldReport($e)) {
$guzzle = new Client([
'headers' => [
'Content-Type' => 'application/json',
],
]);
$exceptionName = get_class($throwable) ?? 'Unknown Exception';
$title = $exceptionName . ': ' . $throwable->getMessage();
$exceptionName = get_class($e) ?? 'Unknown Exception';
$title = $exceptionName . ': ' . $e->getMessage();
$guzzle->post(
config('logging.slack'),