feat: upgrade laravel version from 6 to 7

This commit is contained in:
amir-ys
2024-11-05 00:30:01 +03:30
parent 1b45e40d27
commit a5bc493fd8
3 changed files with 1202 additions and 1119 deletions
+15 -11
View File
@@ -2,8 +2,10 @@
namespace App\Exceptions; namespace App\Exceptions;
use Exception;
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler; use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
use Illuminate\Http\Request;
use Illuminate\Http\Response;
use Throwable;
class Handler extends ExceptionHandler class Handler extends ExceptionHandler
{ {
@@ -29,27 +31,29 @@ class Handler extends ExceptionHandler
/** /**
* Report or log an exception. * Report or log an exception.
* *
* @param \Exception $exception * @param Throwable $throwable
* @return void * @return void
* @throws Throwable
*/ */
public function report(Exception $exception) public function report(Throwable $throwable)
{ {
if (app()->bound('sentry') && $this->shouldReport($exception)) { if (app()->bound('sentry') && $this->shouldReport($throwable)) {
app('sentry')->captureException($exception); app('sentry')->captureException($throwable);
} }
parent::report($exception); parent::report($throwable);
} }
/** /**
* Render an exception into an HTTP response. * Render an exception into an HTTP response.
* *
* @param \Illuminate\Http\Request $request * @param Request $request
* @param \Exception $exception * @param Throwable $throwable
* @return \Illuminate\Http\Response * @return Response
* @throws Throwable
*/ */
public function render($request, Exception $exception) public function render($request, Throwable $throwable): Response
{ {
return parent::render($request, $exception); return parent::render($request, $throwable);
} }
} }
+5 -5
View File
@@ -9,16 +9,16 @@
"license": "MIT", "license": "MIT",
"require": { "require": {
"php": "^7.4", "php": "^7.4",
"laravel/framework": "^6.0", "laravel/framework": "^7.0",
"laravel/passport": "^9.3.2", "laravel/passport": "^9.3.2",
"coraxster/flysystem-aws-s3-v3-minio": "^1.0", "coraxster/flysystem-aws-s3-v3-minio": "^1.0",
"fideloper/proxy": "^4.0", "fideloper/proxy": "^4.0",
"spatie/laravel-medialibrary": "^7.0", "spatie/laravel-medialibrary": "^7.0",
"kalnoy/nestedset": "^5.0", "kalnoy/nestedset": "^5.0",
"laravel/tinker": "^1.0", "laravel/tinker": "^2.0",
"lcobucci/jwt": "3.3.3", "lcobucci/jwt": "3.3.3",
"maatwebsite/excel": "^3.1", "maatwebsite/excel": "^3.1",
"milon/barcode": "^6.0.3", "milon/barcode": "^7.0",
"sentry/sentry-laravel": "^2.3", "sentry/sentry-laravel": "^2.3",
"spatie/laravel-permission": "^3.0" "spatie/laravel-permission": "^3.0"
}, },
@@ -27,8 +27,8 @@
"filp/whoops": "^2.0", "filp/whoops": "^2.0",
"fzaninotto/faker": "^1.4", "fzaninotto/faker": "^1.4",
"mockery/mockery": "^1.0", "mockery/mockery": "^1.0",
"nunomaduro/collision": "^2.0", "nunomaduro/collision": "^4.1",
"phpunit/phpunit": "^7.5" "phpunit/phpunit": "^8.5"
}, },
"config": { "config": {
"optimize-autoloader": true, "optimize-autoloader": true,
Generated
+1182 -1103
View File
File diff suppressed because it is too large Load Diff