Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to Laravel 10 #10247

Merged
merged 3 commits into from
Jul 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion app/Http/Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ class Kernel extends HttpKernel
],
];

// TODO: check if laravel builtin order makes sense
protected $middlewarePriority = [];

/**
* The application's route middleware.
*
Expand All @@ -54,8 +57,8 @@ class Kernel extends HttpKernel
'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
'check-user-restricted' => Middleware\CheckUserRestricted::class,
'guest' => Middleware\RedirectIfAuthenticated::class,
'require-scopes' => Middleware\RequireScopes::class,
'request-cost' => Middleware\RequestCost::class,
'require-scopes' => Middleware\RequireScopes::class,
'throttle' => Middleware\ThrottleRequests::class,
'verify-user' => Middleware\VerifyUser::class,
];
Expand Down
9 changes: 9 additions & 0 deletions app/Providers/AuthServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
use App\Http\Controllers\Passport\AuthorizationController;
use App\Models\OAuth\Client;
use App\Models\OAuth\Token;
use Auth;
use Carbon\Carbon;
use Illuminate\Contracts\Auth\StatefulGuard;
use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;
use Laravel\Passport\Http\Controllers\ApproveAuthorizationController;
use Laravel\Passport\Http\Controllers\DenyAuthorizationController;
Expand All @@ -25,6 +27,13 @@ class AuthServiceProvider extends ServiceProvider
public function register()
{
Passport::ignoreMigrations();
Passport::ignoreRoutes();

// Copied from PassportServiceProvider with the correct
// AuthorizationController class.
$this->app->when(AuthorizationController::class)
->needs(StatefulGuard::class)
->give(fn () => Auth::guard(config('passport.guard', null)));
}

public function boot()
Expand Down
16 changes: 8 additions & 8 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,17 @@
"egulias/email-validator": "*",
"elasticsearch/elasticsearch": "^7.12.0",
"ezyang/htmlpurifier": "*",
"firebase/php-jwt": "^5.2",
"firebase/php-jwt": "*",
"graham-campbell/github": "*",
"guzzlehttp/guzzle": "*",
"itsgoingd/clockwork": "^5.1",
"jenssegers/agent": "*",
"knuckleswtf/scribe": "^4.0",
"laravel/framework": "^8.58",
"laravel/helpers": "^1.1",
"laravel/octane": "^1.3",
"laravel/framework": "^10.0",
"laravel/helpers": "*",
"laravel/octane": "*",
"laravel/passport": "*",
"laravel/slack-notification-channel": "^2.0",
"laravel/slack-notification-channel": "*",
"laravel/tinker": "*",
"laravelcollective/html": "*",
"league/commonmark": "^2.0",
Expand All @@ -42,7 +42,7 @@
"mariuzzo/laravel-js-localization": "*",
"paypal/paypal-checkout-sdk": "*",
"php-ds/php-ds": "^1.3",
"sentry/sentry-laravel": "^2.8",
"sentry/sentry-laravel": "*",
"symfony/yaml": "*",
"tightenco/ziggy": ">=0.8.1",
"xsolla/xsolla-sdk-php": "dev-php81"
Expand All @@ -51,12 +51,12 @@
"beyondcode/laravel-query-detector": "*",
"dealerdirect/phpcodesniffer-composer-installer": "^0.7.0",
"dms/phpunit-arraysubset-asserts": "^0.3.0",
"facade/ignition": "^2.10",
"laravel/dusk": "*",
"mockery/mockery": "*",
"nunomaduro/collision": "^5.4",
"nunomaduro/collision": "^6.1",
"phpunit/phpunit": ">=9.5",
"slevomat/coding-standard": "^8.7",
"spatie/laravel-ignition": "^2.0",
"squizlabs/php_codesniffer": "^3.5",
"symfony/css-selector": "*",
"symfony/dom-crawler": "*"
Expand Down
Loading