Skip to content

Commit 4ade47f

Browse files
committed
Merge branch '11.x'
# Conflicts: # CHANGELOG.md
2 parents fb060e1 + db543b0 commit 4ade47f

36 files changed

+875
-311
lines changed

.github/workflows/issues.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: issues
2+
3+
on:
4+
issues:
5+
types: [labeled]
6+
7+
permissions:
8+
issues: write
9+
10+
jobs:
11+
help-wanted:
12+
uses: laravel/.github/.github/workflows/issues.yml@main

.github/workflows/tests.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,31 @@ name: tests
22

33
on:
44
push:
5+
branches:
6+
- master
7+
- '*.x'
58
pull_request:
69
schedule:
710
- cron: '0 0 * * *'
811

912
jobs:
1013
tests:
11-
runs-on: ubuntu-20.04
14+
runs-on: ubuntu-22.04
1215

1316
strategy:
1417
fail-fast: true
1518
matrix:
16-
php: ['8.0', 8.1]
17-
laravel: [9]
19+
php: ['8.0', 8.1, 8.2]
20+
laravel: [9, 10]
21+
exclude:
22+
- php: '8.0'
23+
laravel: 10
1824

1925
name: PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }}
2026

2127
steps:
2228
- name: Checkout code
23-
uses: actions/checkout@v2
29+
uses: actions/checkout@v3
2430

2531
- name: Setup PHP
2632
uses: shivammathur/setup-php@v2

CHANGELOG.md

Lines changed: 116 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,121 @@
11
# Release Notes
22

3-
## [Unreleased](https://github.com/laravel/passport/compare/v10.4.1...master)
3+
## [Unreleased](https://github.com/laravel/passport/compare/v11.8.0...master)
4+
5+
## [v11.8.0](https://github.com/laravel/passport/compare/v11.7.0...v11.8.0) - 2023-02-17
6+
7+
- Move AuthenticationException into the scope of Laravel Passport by @chrispage1 in https://github.com/laravel/passport/pull/1633
8+
- Custom authorization view response by @JonErickson in https://github.com/laravel/passport/pull/1629
9+
- Fix deprecated $dates property by @TonyWong9527 in https://github.com/laravel/passport/pull/1636
10+
11+
## [v11.7.0](https://github.com/laravel/passport/compare/v11.6.1...v11.7.0) - 2023-02-08
12+
13+
### Added
14+
15+
- Add support for `EncryptCookies` middleware by @axlon in https://github.com/laravel/passport/pull/1628
16+
17+
## [v11.6.1](https://github.com/laravel/passport/compare/v11.6.0...v11.6.1) - 2023-02-03
18+
19+
### Changed
20+
21+
- Indicate current token can be `TransientToken` by @axlon in https://github.com/laravel/passport/pull/1627
22+
23+
## [v11.6.0](https://github.com/laravel/passport/compare/v11.5.1...v11.6.0) - 2023-01-31
24+
25+
### Changed
26+
27+
- Update ClientCommand.php's user_id description by @Smoggert in https://github.com/laravel/passport/pull/1619
28+
- Get model PK instead of forcibly id column by @lucaspanik in https://github.com/laravel/passport/pull/1626
29+
30+
### Fixed
31+
32+
- Fix doc block for `withAccessToken()` by @axlon in https://github.com/laravel/passport/pull/1620
33+
34+
## [v11.5.1](https://github.com/laravel/passport/compare/v11.5.0...v11.5.1) - 2023-01-16
35+
36+
### Fixed
37+
38+
- Get authenticated user from the guard by @hafezdivandari in https://github.com/laravel/passport/pull/1617
39+
40+
## [v11.5.0](https://github.com/laravel/passport/compare/v11.4.0...v11.5.0) - 2023-01-09
41+
42+
### Added
43+
44+
- Laravel v10 Support by @driesvints in https://github.com/laravel/passport/pull/1615
45+
46+
## [v11.4.0](https://github.com/laravel/passport/compare/v11.3.1...v11.4.0) - 2023-01-03
47+
48+
### Changed
49+
50+
- Uses PHP Native Type Declarations 🐘 by @nunomaduro in https://github.com/laravel/passport/pull/1594
51+
52+
## [v11.3.1](https://github.com/laravel/passport/compare/v11.3.0...v11.3.1) - 2022-12-02
53+
54+
### Changed
55+
56+
- Add auth guard to routes by @hafezdivandari in https://github.com/laravel/passport/pull/1603
57+
58+
## [v11.3.0](https://github.com/laravel/passport/compare/v11.2.1...v11.3.0) - 2022-10-22
59+
60+
### Added
61+
62+
- Support prompting login when redirecting for authorization by @hafezdivandari in https://github.com/laravel/passport/pull/1577
63+
64+
### Changed
65+
66+
- Update PurgeCommand.php by @fatoskurtishi in https://github.com/laravel/passport/pull/1586
67+
- Fix ClientRepository doc blocks by @axlon in https://github.com/laravel/passport/pull/1587
68+
- Update docblock by @mnabialek in https://github.com/laravel/passport/pull/1588
69+
70+
## [v11.2.1](https://github.com/laravel/passport/compare/v11.2.0...v11.2.1) - 2022-09-29
71+
72+
### Fixed
73+
74+
- Improve token guard return type by @axlon in https://github.com/laravel/passport/pull/1579
75+
76+
## [v11.2.0](https://github.com/laravel/passport/compare/v11.1.0...v11.2.0) - 2022-09-07
77+
78+
### Changed
79+
80+
- Let OAuth2 server handle the denying response by @hafezdivandari in https://github.com/laravel/passport/pull/1572
81+
82+
## [v11.1.0](https://github.com/laravel/passport/compare/v11.0.1...v11.1.0) - 2022-09-05
83+
84+
### Added
85+
86+
- Support prompting re-consent when redirecting for authorization by @hafezdivandari in https://github.com/laravel/passport/pull/1567
87+
- Support disabling prompt when redirecting for authorization by @hafezdivandari in https://github.com/laravel/passport/pull/1569
88+
89+
## [v11.0.1](https://github.com/laravel/passport/compare/v11.0.0...v11.0.1) - 2022-08-29
90+
91+
### Changed
92+
93+
- Custom days and hours to passport purge command by @rubengg86 in https://github.com/laravel/passport/pull/1563
94+
- Allow for bootstrapping without loading routes by @axlon in https://github.com/laravel/passport/pull/1564
95+
96+
## [v11.0.0](https://github.com/laravel/passport/compare/v10.4.1...v11.0.0) - 2022-08-19
97+
98+
### Added
99+
100+
- Allow authenticated client to be retrieved from the guard by @axlon in https://github.com/laravel/passport/pull/1508
101+
102+
### Changed
103+
104+
- Revert model DB connection customization by @driesvints in https://github.com/laravel/passport/pull/1412
105+
- Allow timestamps on Token model by @driesvints in https://github.com/laravel/passport/pull/1425
106+
- Improve authenticateViaBearerToken() performance by @alecpl in https://github.com/laravel/passport/pull/1447
107+
- Refactor routes to dedicated file by @driesvints in https://github.com/laravel/passport/pull/1464
108+
109+
### Fixed
110+
111+
- Stub client on guard when calling Passport::actingAsClient() by @axlon in https://github.com/laravel/passport/pull/1519
112+
- Fix scope inheritance when using Passport::actingAs() by @axlon in https://github.com/laravel/passport/pull/1551
113+
114+
### Removed
115+
116+
- Drop PHP 7.x and Laravel v8 by @driesvints in https://github.com/laravel/passport/pull/1558
117+
- Remove deprecated properties by @driesvints in https://github.com/laravel/passport/pull/1560
118+
- Remove deprecated functionality and simplify some feature tests by @driesvints in https://github.com/laravel/passport/pull/1559
4119

5120
## [v10.4.1](https://github.com/laravel/passport/compare/v10.4.0...v10.4.1) - 2022-04-16
6121

UPGRADE.md

Lines changed: 44 additions & 0 deletions
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

composer.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,16 @@
1616
"require": {
1717
"php": "^8.0",
1818
"ext-json": "*",
19-
"firebase/php-jwt": "^6.0",
20-
"illuminate/auth": "^9.0",
21-
"illuminate/console": "^9.0",
22-
"illuminate/container": "^9.0",
23-
"illuminate/contracts": "^9.0",
24-
"illuminate/cookie": "^9.0",
25-
"illuminate/database": "^9.0",
26-
"illuminate/encryption": "^9.0",
27-
"illuminate/http": "^9.0",
28-
"illuminate/support": "^9.0",
19+
"firebase/php-jwt": "^6.3.1",
20+
"illuminate/auth": "^9.0|^10.0",
21+
"illuminate/console": "^9.0|^10.0",
22+
"illuminate/container": "^9.0|^10.0",
23+
"illuminate/contracts": "^9.0|^10.0",
24+
"illuminate/cookie": "^9.0|^10.0",
25+
"illuminate/database": "^9.0|^10.0",
26+
"illuminate/encryption": "^9.0|^10.0",
27+
"illuminate/http": "^9.0|^10.0",
28+
"illuminate/support": "^9.0|^10.0",
2929
"lcobucci/jwt": "^3.4|^4.0",
3030
"league/oauth2-server": "^8.2",
3131
"nyholm/psr7": "^1.3",
@@ -34,7 +34,7 @@
3434
},
3535
"require-dev": {
3636
"mockery/mockery": "^1.0",
37-
"orchestra/testbench": "^7.0",
37+
"orchestra/testbench": "^7.0|^8.0",
3838
"phpunit/phpunit": "^9.3"
3939
},
4040
"autoload": {

config/passport.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,19 @@
22

33
return [
44

5+
/*
6+
|--------------------------------------------------------------------------
7+
| Passport Guard
8+
|--------------------------------------------------------------------------
9+
|
10+
| Here you may specify which authentication guard Passport will use when
11+
| authenticating users. This value should correspond with one of your
12+
| guards that is already present in your "auth" configuration file.
13+
|
14+
*/
15+
16+
'guard' => 'web',
17+
518
/*
619
|--------------------------------------------------------------------------
720
| Encryption Keys

database/migrations/2016_06_01_000001_create_oauth_auth_codes_table.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,8 @@
88
{
99
/**
1010
* Run the migrations.
11-
*
12-
* @return void
1311
*/
14-
public function up()
12+
public function up(): void
1513
{
1614
Schema::create('oauth_auth_codes', function (Blueprint $table) {
1715
$table->string('id', 100)->primary();
@@ -25,10 +23,8 @@ public function up()
2523

2624
/**
2725
* Reverse the migrations.
28-
*
29-
* @return void
3026
*/
31-
public function down()
27+
public function down(): void
3228
{
3329
Schema::dropIfExists('oauth_auth_codes');
3430
}

database/migrations/2016_06_01_000002_create_oauth_access_tokens_table.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,8 @@
88
{
99
/**
1010
* Run the migrations.
11-
*
12-
* @return void
1311
*/
14-
public function up()
12+
public function up(): void
1513
{
1614
Schema::create('oauth_access_tokens', function (Blueprint $table) {
1715
$table->string('id', 100)->primary();
@@ -27,10 +25,8 @@ public function up()
2725

2826
/**
2927
* Reverse the migrations.
30-
*
31-
* @return void
3228
*/
33-
public function down()
29+
public function down(): void
3430
{
3531
Schema::dropIfExists('oauth_access_tokens');
3632
}

database/migrations/2016_06_01_000003_create_oauth_refresh_tokens_table.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,8 @@
88
{
99
/**
1010
* Run the migrations.
11-
*
12-
* @return void
1311
*/
14-
public function up()
12+
public function up(): void
1513
{
1614
Schema::create('oauth_refresh_tokens', function (Blueprint $table) {
1715
$table->string('id', 100)->primary();
@@ -23,10 +21,8 @@ public function up()
2321

2422
/**
2523
* Reverse the migrations.
26-
*
27-
* @return void
2824
*/
29-
public function down()
25+
public function down(): void
3026
{
3127
Schema::dropIfExists('oauth_refresh_tokens');
3228
}

database/migrations/2016_06_01_000004_create_oauth_clients_table.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,8 @@
88
{
99
/**
1010
* Run the migrations.
11-
*
12-
* @return void
1311
*/
14-
public function up()
12+
public function up(): void
1513
{
1614
Schema::create('oauth_clients', function (Blueprint $table) {
1715
$table->bigIncrements('id');
@@ -29,10 +27,8 @@ public function up()
2927

3028
/**
3129
* Reverse the migrations.
32-
*
33-
* @return void
3430
*/
35-
public function down()
31+
public function down(): void
3632
{
3733
Schema::dropIfExists('oauth_clients');
3834
}

0 commit comments

Comments
 (0)