Skip to content

Commit a57723e

Browse files
Passport v11 upgrade guide (#1561)
* Passport v11 upgrade guide * Update UPGRADE.md Co-authored-by: Taylor Otwell <[email protected]>
1 parent a17975f commit a57723e

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

UPGRADE.md

+44
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,50 @@
22

33
## General Notes
44

5+
## Upgrading To 11.0 From 10.x
6+
7+
### Minimum PHP Version
8+
9+
PHP 8.0 is now the minimum required version.
10+
11+
### Minimum Laravel Version
12+
13+
Laravel 9.0 is now the minimum required version.
14+
15+
### Reverting Model DB Connection Customization
16+
17+
PR: https://github.com/laravel/passport/pull/1412
18+
19+
Customizing model database connections through the migration files has been reverted. This was first introduced in [this PR](https://github.com/laravel/passport/pull/1255).
20+
21+
If you need to customize the database connection for a model you should override the models [as explained in the documentation](https://laravel.com/docs/9.x/passport#overriding-default-models).
22+
23+
### Allow Timestamps On Token model
24+
25+
PR: https://github.com/laravel/passport/pull/1425
26+
27+
Timestamps are now allowed on the `Token` model. If you specifically didn't want these model's timestamps to be updated then you may override the `Token` model [as explained in the documentation](https://laravel.com/docs/9.x/passport#overriding-default-models).
28+
29+
### Refactor Routes To Dedicated File
30+
31+
PR: https://github.com/laravel/passport/pull/1464
32+
33+
Passport's routes have been moved to a dedicated route file. You can remove the `Passport::routes()` call from your application's service provider.
34+
35+
If you previously relied on overwriting routes using `routes($callback = null, array $options = [])` you may now achieve the same behavior by simply overwriting the routes in your application's own `web.php` route file.
36+
37+
### Stubbing Client In Tests
38+
39+
PR: https://github.com/laravel/passport/pull/1519
40+
41+
Previously, a stubbed client created via `Passport::actingAsClient(...)` wasn't retrieved when calling the `->client()` method on the API guard. This has been fixed in Passport v11 to reflect real-world situations and you may need to accommodate for this behavior in your tests.
42+
43+
### Scope Inheritance In Tests
44+
45+
PR: https://github.com/laravel/passport/pull/1551
46+
47+
Previously, scopes weren't inherited when using `Passport::actingAs(...)`. This has been fixed in Passport v11 to reflect real-world situations and you may need to accommodate for this behavior in your tests.
48+
549
## Upgrading To 10.0 From 9.x
650

751
### Minimum PHP Version

0 commit comments

Comments
 (0)