Skip to content

Commit 94a9c6b

Browse files
committed
Fix Laravel 13 compatibility
Exclude PHP 8.2 from Laravel 13 matrix (L13 requires PHP 8.3+). Remove static from closure passed to AuthManager::extend() β€” Laravel 13 binds $this to it, which errors on static closures. πŸ€– Generated with Claude Code
1 parent b735d58 commit 94a9c6b

3 files changed

Lines changed: 6 additions & 2 deletions

File tree

β€Ž.github/workflows/validate.ymlβ€Ž

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ jobs:
5555
laravel-version: "^13"
5656
- php-version: "8.1"
5757
laravel-version: "^13"
58+
- php-version: "8.2"
59+
laravel-version: "^13"
5860

5961
steps:
6062
- uses: actions/checkout@v4
@@ -131,6 +133,8 @@ jobs:
131133
laravel-version: "^13"
132134
- php-version: "8.1"
133135
laravel-version: "^13"
136+
- php-version: "8.2"
137+
laravel-version: "^13"
134138

135139
services:
136140
mysql:

β€Žsrc/Subscriptions/SubscriptionServiceProvider.phpβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public function boot(EventsDispatcher $dispatcher, ConfigRepository $configRepos
6363
$this->app->bind(SubscriptionIterator::class, AuthenticatingSyncIterator::class);
6464

6565
$this->app->make(AuthManager::class)
66-
->extend(SubscriptionGuard::GUARD_NAME, static fn (): SubscriptionGuard => new SubscriptionGuard());
66+
->extend(SubscriptionGuard::GUARD_NAME, fn (): SubscriptionGuard => new SubscriptionGuard());
6767
}
6868
}
6969

β€Žtests/Unit/Subscriptions/Iterators/AuthenticatingSyncIteratorTest.phpβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public function testSetsAndResetsGuardContextAfterEachIteration(): void
5656

5757
$authManager = $this->app->make(AuthManager::class);
5858

59-
$authManager->extend(SubscriptionGuard::GUARD_NAME, static fn (): SubscriptionGuard => $guard);
59+
$authManager->extend(SubscriptionGuard::GUARD_NAME, fn (): SubscriptionGuard => $guard);
6060

6161
$processedItems = [];
6262
$authenticatedUsers = [];

0 commit comments

Comments
Β (0)