From 629cdcbb1259d709e728a01ca1ad0b26dd5f5ecc Mon Sep 17 00:00:00 2001 From: Max Date: Sun, 10 May 2020 17:43:47 +1000 Subject: [PATCH 1/3] Various package updates, exception handling update for laravel 7 --- app/Exceptions/ApiExceptionHandler.php | 2 ++ app/Exceptions/Handler.php | 16 +++++++++++----- composer.json | 24 ++++++++++++------------ 3 files changed, 25 insertions(+), 17 deletions(-) diff --git a/app/Exceptions/ApiExceptionHandler.php b/app/Exceptions/ApiExceptionHandler.php index 94c430b..322c754 100644 --- a/app/Exceptions/ApiExceptionHandler.php +++ b/app/Exceptions/ApiExceptionHandler.php @@ -7,6 +7,8 @@ /** * This class extends the Dingo API Exception Handler, and can be used to modify it's functionality, if required * + * Unless you have a specific-use case and understand what you are doing, it's best not to modify this. + * * Class ApiHandler */ class ApiExceptionHandler extends RestfulApiExceptionHandler diff --git a/app/Exceptions/Handler.php b/app/Exceptions/Handler.php index 043cad6..8b0a7f7 100644 --- a/app/Exceptions/Handler.php +++ b/app/Exceptions/Handler.php @@ -2,9 +2,15 @@ namespace App\Exceptions; -use Exception; +use Throwable; use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler; +/** + * This is your application's exception handler + * + * Class Handler + * @package App\Exceptions + */ class Handler extends ExceptionHandler { /** @@ -29,10 +35,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 +47,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/composer.json b/composer.json index bfde5b9..3c7489a 100644 --- a/composer.json +++ b/composer.json @@ -11,21 +11,21 @@ } ], "require": { - "php": "^7.2", - "fideloper/proxy": "^4.0", - "laravel/framework": "^6", - "laravel/tinker": "^1.0", - "specialtactics/l5-api": "^1.1" + "php": "^7.2.5", + "fideloper/proxy": "^4.2", + "laravel/framework": "^7", + "laravel/tinker": "^2.4", + "specialtactics/l5-api": "^2" }, "require-dev": { - "barryvdh/laravel-ide-helper": "^2.4", - "beyondcode/laravel-dump-server": "^1.0", - "facade/ignition": "^1.4", - "fzaninotto/faker": "^1.4", - "laravel/telescope": "^2", + "barryvdh/laravel-ide-helper": "^2.7", + "beyondcode/laravel-dump-server": "^1.4", + "facade/ignition": "^2.0", + "fzaninotto/faker": "^1.9", + "laravel/telescope": "^3.3", "mockery/mockery": "^1.0", - "nunomaduro/collision": "^3.0", - "phpunit/phpunit": "^8.3" + "nunomaduro/collision": "^4.2", + "phpunit/phpunit": "^8.5" }, "config": { "optimize-autoloader": true, From 884a762ce9879e8393069a6da1acd19ade0c3436 Mon Sep 17 00:00:00 2001 From: Max Date: Sun, 10 May 2020 17:45:16 +1000 Subject: [PATCH 2/3] Apply fixes from StyleCI (#37) --- app/Exceptions/Handler.php | 3 +-- config/telescope.php | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/app/Exceptions/Handler.php b/app/Exceptions/Handler.php index 8b0a7f7..fea9bfb 100644 --- a/app/Exceptions/Handler.php +++ b/app/Exceptions/Handler.php @@ -2,14 +2,13 @@ namespace App\Exceptions; -use Throwable; use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler; +use Throwable; /** * This is your application's exception handler * * Class Handler - * @package App\Exceptions */ class Handler extends ExceptionHandler { diff --git a/config/telescope.php b/config/telescope.php index 187e789..2be56c1 100644 --- a/config/telescope.php +++ b/config/telescope.php @@ -14,7 +14,7 @@ | | Change to 'dark' for dark mode */ - 'ui-mode' => env('TELESCOPE_UI_MODE', 'light'), + 'ui-mode' => env('TELESCOPE_UI_MODE', 'light'), /* |-------------------------------------------------------------------------- From ece65784b8c4964e14ffb53c69ef1c1595b4dcef Mon Sep 17 00:00:00 2001 From: Max Date: Tue, 12 May 2020 16:06:45 +1000 Subject: [PATCH 3/3] Make some versions more specific --- composer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 3c7489a..c3fedf4 100644 --- a/composer.json +++ b/composer.json @@ -13,9 +13,9 @@ "require": { "php": "^7.2.5", "fideloper/proxy": "^4.2", - "laravel/framework": "^7", + "laravel/framework": "^7.0", "laravel/tinker": "^2.4", - "specialtactics/l5-api": "^2" + "specialtactics/l5-api": "^2.0" }, "require-dev": { "barryvdh/laravel-ide-helper": "^2.7",