feat: upgrading laravel version to 11 from 10

This commit is contained in:
amir-ys
2024-11-07 23:01:06 +03:30
parent acb9871379
commit ff8db13621
9 changed files with 785 additions and 1394 deletions
+9 -9
View File
@@ -4,7 +4,7 @@ namespace App\Exceptions;
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
use Illuminate\Http\Request;
use Illuminate\Http\Response;
use Symfony\Component\HttpFoundation\Response;
use Throwable;
class Handler extends ExceptionHandler
@@ -31,29 +31,29 @@ class Handler extends ExceptionHandler
/**
* Report or log an exception.
*
* @param Throwable $throwable
* @param Throwable $e
* @return void
* @throws Throwable
*/
public function report(Throwable $throwable)
public function report(Throwable $e)
{
if (app()->bound('sentry') && $this->shouldReport($throwable)) {
app('sentry')->captureException($throwable);
if (app()->bound('sentry') && $this->shouldReport($e)) {
app('sentry')->captureException($e);
}
parent::report($throwable);
parent::report($e);
}
/**
* Render an exception into an HTTP response.
*
* @param Request $request
* @param Throwable $throwable
* @param Throwable $e
* @return Response
* @throws Throwable
*/
public function render($request, Throwable $throwable): Response
public function render($request, Throwable $e): Response
{
return parent::render($request, $throwable);
return parent::render($request, $e);
}
}
+1 -2
View File
@@ -28,7 +28,6 @@ class AuthServiceProvider extends ServiceProvider
public function boot()
{
$this->registerPolicies();
Passport::loadKeysFrom(__DIR__.'/../secrets/oauth');
Passport::enablePasswordGrant();
}
}
+8 -8
View File
@@ -9,24 +9,24 @@
"license": "MIT",
"require": {
"php": "^8.2",
"laravel/framework": "^10.0",
"laravel/passport": "^11.0",
"laravel/framework": "^11.0",
"laravel/passport": "^12.0",
"league/flysystem-aws-s3-v3": "^3.0",
"spatie/laravel-medialibrary": "^10.0",
"spatie/laravel-medialibrary": "^11.0",
"kalnoy/nestedset": "^6.0",
"laravel/tinker": "^2.0",
"lcobucci/jwt": "^4.0",
"maatwebsite/excel": "^3.1",
"milon/barcode": "^10.0",
"sentry/sentry-laravel": "^3.0",
"spatie/laravel-permission": "^5.0"
"milon/barcode": "^11.0",
"sentry/sentry-laravel": "^4.0",
"spatie/laravel-permission": "^6.0"
},
"require-dev": {
"beyondcode/laravel-dump-server": "^1.0",
"beyondcode/laravel-dump-server": "^2.0",
"filp/whoops": "^2.0",
"fzaninotto/faker": "^1.4",
"mockery/mockery": "^1.0",
"nunomaduro/collision": "^7.0",
"nunomaduro/collision": "^8.1",
"nunomaduro/larastan": "^2.9",
"phpstan/phpstan": "^1.12",
"phpunit/phpunit": "^10.0"
Generated
+611 -1375
View File
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,31 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('oauth_auth_codes', function (Blueprint $table) {
$table->string('id', 100)->primary();
$table->unsignedBigInteger('user_id')->index();
$table->unsignedBigInteger('client_id');
$table->text('scopes')->nullable();
$table->boolean('revoked');
$table->dateTime('expires_at')->nullable();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('oauth_auth_codes');
}
};
@@ -0,0 +1,33 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('oauth_access_tokens', function (Blueprint $table) {
$table->string('id', 100)->primary();
$table->unsignedBigInteger('user_id')->nullable()->index();
$table->unsignedBigInteger('client_id');
$table->string('name')->nullable();
$table->text('scopes')->nullable();
$table->boolean('revoked');
$table->timestamps();
$table->dateTime('expires_at')->nullable();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('oauth_access_tokens');
}
};
@@ -0,0 +1,29 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('oauth_refresh_tokens', function (Blueprint $table) {
$table->string('id', 100)->primary();
$table->string('access_token_id', 100)->index();
$table->boolean('revoked');
$table->dateTime('expires_at')->nullable();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('oauth_refresh_tokens');
}
};
@@ -0,0 +1,35 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('oauth_clients', function (Blueprint $table) {
$table->bigIncrements('id');
$table->unsignedBigInteger('user_id')->nullable()->index();
$table->string('name');
$table->string('secret', 100)->nullable();
$table->string('provider')->nullable();
$table->text('redirect');
$table->boolean('personal_access_client');
$table->boolean('password_client');
$table->boolean('revoked');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('oauth_clients');
}
};
@@ -0,0 +1,28 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('oauth_personal_access_clients', function (Blueprint $table) {
$table->bigIncrements('id');
$table->unsignedBigInteger('client_id');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('oauth_personal_access_clients');
}
};