Skip to content

Commit

Permalink
Upgrade to laravel 10
Browse files Browse the repository at this point in the history
- reset middleware order (to match existing behaviour; should probably readd it later)
- reset connections when dealing with database outside normal test cycle
  • Loading branch information
nanaya committed Jun 15, 2023
1 parent 1831e26 commit af96d7d
Show file tree
Hide file tree
Showing 12 changed files with 2,670 additions and 2,331 deletions.
4 changes: 3 additions & 1 deletion app/Http/Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ class Kernel extends HttpKernel
],
];

protected $middlewarePriority = [];

/**
* The application's route middleware.
*
Expand All @@ -54,8 +56,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

0 comments on commit af96d7d

Please sign in to comment.