Skip to content

Commit

Permalink
[11.x] Removed Spark's subscribed default alias Middleware (#50489)
Browse files Browse the repository at this point in the history
* Removed `Spark`'s `subscribed` default alias

* Conditional `subscribed` alias added
  • Loading branch information
akr4m authored Mar 12, 2024
1 parent 9ba525d commit eac3418
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/Illuminate/Foundation/Configuration/Middleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -737,7 +737,7 @@ public function getMiddlewareAliases()
*/
protected function defaultAliases()
{
return [
$aliases = [
'auth' => \Illuminate\Auth\Middleware\Authenticate::class,
'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
'auth.session' => \Illuminate\Session\Middleware\AuthenticateSession::class,
Expand All @@ -747,12 +747,17 @@ protected function defaultAliases()
'password.confirm' => \Illuminate\Auth\Middleware\RequirePassword::class,
'precognitive' => \Illuminate\Foundation\Http\Middleware\HandlePrecognitiveRequests::class,
'signed' => \Illuminate\Routing\Middleware\ValidateSignature::class,
'subscribed' => \Spark\Http\Middleware\VerifyBillableIsSubscribed::class,
'throttle' => $this->throttleWithRedis
? \Illuminate\Routing\Middleware\ThrottleRequestsWithRedis::class
: \Illuminate\Routing\Middleware\ThrottleRequests::class,
'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class,
];

if (class_exists(\Spark\Http\Middleware\VerifyBillableIsSubscribed::class)) {
$aliases['subscribed'] = \Spark\Http\Middleware\VerifyBillableIsSubscribed::class;
}

return $aliases;
}

/**
Expand Down

0 comments on commit eac3418

Please sign in to comment.