Skip to content

Commit dcd57ed

Browse files
Merge branch 'master' into master-token-revocation-introspection
2 parents 2915076 + 9002f01 commit dcd57ed

File tree

7 files changed

+20
-10
lines changed

7 files changed

+20
-10
lines changed

.github/workflows/static-analysis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212

1313
strategy:
1414
matrix:
15-
php-version: [8.1, 8.2, 8.3, 8.4]
15+
php-version: [8.1, 8.2, 8.3, 8.4, 8.5]
1616
composer-stability: [prefer-lowest, prefer-stable]
1717
operating-system:
1818
- ubuntu-latest

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
strategy:
1212
fail-fast: false
1313
matrix:
14-
php: [8.1, 8.2, 8.3, 8.4]
14+
php: [8.1, 8.2, 8.3, 8.4, 8.5]
1515
os: [ubuntu-latest, windows-latest]
1616
stability: [prefer-lowest, prefer-stable]
1717

CHANGELOG.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,16 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
77

88
## [Unreleased]
99

10+
### Changed
11+
12+
- User ID is now passed to the finalizeScopes method for the Refresh Grant (PR #1414)
13+
14+
## [9.3.0] - released 2025-11-25
15+
1016
### Added
1117

1218
- Added sensitive parameter to avoid sensitive data being included in stack traces (PR #1483)
19+
- Support for PHP 8.5 (PR #1492)
1320

1421
### Fixed
1522

@@ -779,7 +786,8 @@ Version 5 is a complete code rewrite.
779786

780787
- First major release
781788

782-
[Unreleased]: https://github.com/thephpleague/oauth2-server/compare/9.2.0...HEAD
789+
[Unreleased]: https://github.com/thephpleague/oauth2-server/compare/9.3.0...HEAD
790+
[9.3.0]: https://github.com/thephpleague/oauth2-server/compare/9.2.0...9.3.0
783791
[9.2.0]: https://github.com/thephpleague/oauth2-server/compare/9.1.0...9.2.0
784792
[9.1.0]: https://github.com/thephpleague/oauth2-server/compare/9.0.1...9.1.0
785793
[9.0.1]: https://github.com/thephpleague/oauth2-server/compare/9.0.0...9.0.1

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ The latest version of this package supports the following versions of PHP:
3838
* PHP 8.2
3939
* PHP 8.3
4040
* PHP 8.4
41+
* PHP 8.5
4142

4243
The `openssl` and `json` extensions are also required.
4344

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"homepage": "https://oauth2.thephpleague.com/",
55
"license": "MIT",
66
"require": {
7-
"php": "~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0",
7+
"php": "~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0",
88
"ext-openssl": "*",
99
"league/event": "^3.0",
1010
"league/uri": "^7.0",

src/Grant/RefreshTokenGrant.php

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,12 @@ public function respondToAccessTokenRequest(
6666
}
6767
}
6868

69-
$scopes = $this->scopeRepository->finalizeScopes($scopes, $this->getIdentifier(), $client);
69+
$userId = $oldRefreshToken['user_id'];
70+
if (is_int($userId)) {
71+
$userId = (string) $userId;
72+
}
73+
74+
$scopes = $this->scopeRepository->finalizeScopes($scopes, $this->getIdentifier(), $client, $userId);
7075

7176
// Expire old tokens
7277
$this->accessTokenRepository->revokeAccessToken($oldRefreshToken['access_token_id']);
@@ -75,10 +80,6 @@ public function respondToAccessTokenRequest(
7580
}
7681

7782
// Issue and persist new access token
78-
$userId = $oldRefreshToken['user_id'];
79-
if (is_int($userId)) {
80-
$userId = (string) $userId;
81-
}
8283
$accessToken = $this->issueAccessToken($accessTokenTTL, $client, $userId, $scopes);
8384
$this->getEmitter()->emit(new RequestAccessTokenEvent(RequestEvent::ACCESS_TOKEN_ISSUED, $request, $accessToken));
8485
$responseType->setAccessToken($accessToken);

tests/Grant/RefreshTokenGrantTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -605,7 +605,7 @@ public function testRespondToRequestFinalizeScopes(): void
605605
$scopeRepositoryMock
606606
->expects(self::once())
607607
->method('finalizeScopes')
608-
->with($scopes, $grant->getIdentifier(), $client)
608+
->with($scopes, $grant->getIdentifier(), $client, '123', null)
609609
->willReturn($finalizedScopes);
610610

611611
$accessToken = new AccessTokenEntity();

0 commit comments

Comments
 (0)