Skip to content

Commit 7a59431

Browse files
committed
Bridge L13 support into v6, for plugin simplicity.
Until 3rd party packages that depend on this package can migrate to the stricture requirements of v7, this bridges Laravel 13 compatibility into the older v6 branch. NOTE: the v6 branch is unmaintained unless a critical bug is found.
1 parent 65fb918 commit 7a59431

2 files changed

Lines changed: 14 additions & 10 deletions

File tree

composer.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,17 @@
2323
"homepage": "https://github.com/spatie/laravel-permission",
2424
"require": {
2525
"php": "^8.0",
26-
"illuminate/auth": "^8.12|^9.0|^10.0|^11.0|^12.0",
27-
"illuminate/container": "^8.12|^9.0|^10.0|^11.0|^12.0",
28-
"illuminate/contracts": "^8.12|^9.0|^10.0|^11.0|^12.0",
29-
"illuminate/database": "^8.12|^9.0|^10.0|^11.0|^12.0"
26+
"illuminate/auth": "^8.12|^9.0|^10.0|^11.0|^12.0|^13.0",
27+
"illuminate/container": "^8.12|^9.0|^10.0|^11.0|^12.0|^13.0",
28+
"illuminate/contracts": "^8.12|^9.0|^10.0|^11.0|^12.0|^13.0",
29+
"illuminate/database": "^8.12|^9.0|^10.0|^11.0|^12.0|^13.0"
3030
},
3131
"require-dev": {
32-
"laravel/passport": "^11.0|^12.0",
32+
"laravel/passport": "^11.0|^12.0|^13.0",
3333
"laravel/pint": "^1.0",
34-
"orchestra/testbench": "^6.23|^7.0|^8.0|^9.0|^10.0",
35-
"pestphp/pest": "^2.0|^3.0",
36-
"pestphp/pest-plugin-laravel": "^2.0|^3.0"
34+
"orchestra/testbench": "^6.23|^7.0|^8.0|^9.0|^10.0|^11.0",
35+
"pestphp/pest": "^2.0|^3.0|^4.0",
36+
"pestphp/pest-plugin-laravel": "^2.0|^3.0|^4.0"
3737
},
3838
"minimum-stability": "dev",
3939
"prefer-stable": true,

tests/TestSupport/TestCase.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,10 +204,14 @@ public function setUpPassport(): void
204204
// $this->artisan('passport:keys');
205205
$this->loadMigrationsFrom(__DIR__.'/../../vendor/laravel/passport/database/migrations/');
206206
$provider = in_array('users', array_keys(config('auth.providers'))) ? 'users' : null;
207-
$this->artisan('passport:client', ['--personal' => true, '--name' => config('app.name').' Personal Access Client']);
207+
$this->artisan('passport:client', ['--personal' => true, '--name' => config('app.name').' Personal Access Client', '--provider' => $provider]);
208208
$this->artisan('passport:client', ['--password' => true, '--name' => config('app.name').' Password Grant Client', '--provider' => $provider]);
209209

210-
$this->testClient = Client::create(['name' => 'Test', 'redirect' => 'https://example.com', 'personal_access_client' => 0, 'password_client' => 0, 'revoked' => 0]);
210+
if ($this->getLaravelVersion() < 13) {
211+
$this->testClient = Client::create(['name' => 'Test', 'redirect' => 'https://example.com', 'personal_access_client' => 0, 'password_client' => 0, 'revoked' => 0]);
212+
} else {
213+
$this->testClient = Client::create(['name' => 'Test', 'redirect_uris' => ['https://example.com'], 'grant_types' => [], 'revoked' => 0]);
214+
}
211215
$this->testClientRole = $app[Role::class]->create(['name' => 'clientRole', 'guard_name' => 'api']);
212216
$this->testClientPermission = $app[Permission::class]->create(['name' => 'edit-posts', 'guard_name' => 'api']);
213217
}

0 commit comments

Comments
 (0)