diff --git a/.travis.yml b/.travis.yml index 1ad9e71..07b91f7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,14 +3,10 @@ language: php matrix: fast_finish: true include: - - php: 7.2 - env: LARAVEL_VERSION=5.8.* - - php: 7.2 - env: LARAVEL_VERSION=6.0.* - php: 7.3 - env: LARAVEL_VERSION=5.8.* - - php: 7.3 - env: LARAVEL_VERSION=6.0.* + env: LARAVEL_VERSION=7.* + - php: 7.4 + env: LARAVEL_VERSION=7.* sudo: false diff --git a/composer.json b/composer.json index 37cba67..cd88799 100644 --- a/composer.json +++ b/composer.json @@ -10,23 +10,22 @@ } ], "require": { - "php": "^7.2", - "dingo/api": "^2.4", + "php": "^7.2.5", + "dingo/api": "^3.0.0", "tymon/jwt-auth": "^1.0", - "illuminate/support": "^6 || ^5.8", + "illuminate/support": "^7.0", "webpatser/laravel-uuid": "^3.0", - "ramsey/uuid": "^3.0", - "atehnix/laravel-stubs": "~6.0" + "ramsey/uuid": "^3.0" }, "require-dev": { "ext-json": "*", "beyondcode/laravel-dump-server": "^1.0", "fzaninotto/faker": "^1.4", "mockery/mockery": "^1.0", - "nunomaduro/collision": "^2.0", - "phpunit/phpunit": "^7.5 || ^8.3", - "orchestra/testbench": "^4 || ^3", - "fideloper/proxy": "^4.0" + "nunomaduro/collision": "^4.2", + "phpunit/phpunit": "^8.5", + "orchestra/testbench": "^5", + "fideloper/proxy": "^4.2" }, "autoload": { "psr-4": { diff --git a/src/Exceptions/RestfulApiExceptionHandler.php b/src/Exceptions/RestfulApiExceptionHandler.php index dc1255b..866fa20 100644 --- a/src/Exceptions/RestfulApiExceptionHandler.php +++ b/src/Exceptions/RestfulApiExceptionHandler.php @@ -3,7 +3,7 @@ namespace Specialtactics\L5Api\Exceptions; use Config; -use Exception; +use Throwable; use Dingo\Api\Exception\Handler as ExceptionHandler; use Specialtactics\L5Api\APIBoilerplate; use Specialtactics\L5Api\Helpers; @@ -23,10 +23,10 @@ class RestfulApiExceptionHandler extends ExceptionHandler /** * Override prepare replacements function to add extra functionality * - * @param Exception $exception + * @param Throwable $exception * @return array */ - protected function prepareReplacements(Exception $exception) + protected function prepareReplacements(Throwable $exception) { // Run parent $replacements = parent::prepareReplacements($exception); diff --git a/test/app/Exceptions/Handler.php b/test/app/Exceptions/Handler.php index 043cad6..9159de5 100644 --- a/test/app/Exceptions/Handler.php +++ b/test/app/Exceptions/Handler.php @@ -2,7 +2,7 @@ namespace App\Exceptions; -use Exception; +use Throwable; use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler; class Handler extends ExceptionHandler @@ -29,23 +29,23 @@ class Handler extends ExceptionHandler /** * Report or log an exception. * - * @param \Exception $exception + * @param Throwable $e * @return void */ - public function report(Exception $exception) + public function report(Throwable $e) { - parent::report($exception); + parent::report($e); } /** * Render an exception into an HTTP response. * * @param \Illuminate\Http\Request $request - * @param \Exception $exception + * @param Throwable $e * @return \Illuminate\Http\Response */ - public function render($request, Exception $exception) + public function render($request, Throwable $e) { - return parent::render($request, $exception); + return parent::render($request, $e); } }