Skip to content

Commit b06a413

Browse files
authored
[12.x] Supports PHP 8.4 (#1799)
* [12.x] Supports PHP 8.4 * wip Signed-off-by: Mior Muhammad Zaki <[email protected]> * Update tests.yml * wip Signed-off-by: Mior Muhammad Zaki <[email protected]> * Update tests.yml --------- Signed-off-by: Mior Muhammad Zaki <[email protected]>
1 parent e94b531 commit b06a413

File tree

4 files changed

+19
-15
lines changed

4 files changed

+19
-15
lines changed

.github/workflows/tests.yml

+13-11
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,20 @@ jobs:
1616
strategy:
1717
fail-fast: true
1818
matrix:
19-
php: ['8.0', 8.1, 8.2, 8.3]
20-
laravel: [9, 10, 11]
21-
exclude:
22-
- php: '8.0'
23-
laravel: 10
19+
php: [8.1, 8.2, 8.3, 8.4]
20+
laravel: [10, 11]
21+
include:
22+
- php: 8.2
23+
laravel: 9
24+
- php: 8.1
25+
laravel: 9
2426
- php: '8.0'
25-
laravel: 11
27+
laravel: 9
28+
exclude:
2629
- php: 8.1
2730
laravel: 11
28-
- php: 8.3
29-
laravel: 9
31+
- php: 8.4
32+
laravel: 10
3033

3134
name: PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }}
3235

@@ -45,8 +48,7 @@ jobs:
4548

4649
- name: Install dependencies
4750
run: |
48-
composer require "illuminate/contracts=^${{ matrix.laravel }}" --no-update
49-
composer update --prefer-dist --no-interaction --no-progress
51+
composer update --prefer-dist --no-interaction --no-progress --with="illuminate/contracts=^${{ matrix.laravel }}"
5052
5153
- name: Execute tests
52-
run: vendor/bin/phpunit
54+
run: vendor/bin/phpunit ${{ matrix.laravel >= 10 && '--display-deprecations' || '' }}

.styleci.yml

+2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
php:
22
preset: laravel
3+
enabled:
4+
- nullable_type_declarations
35
js: true
46
css: true

src/Passport.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ public static function tokensCan(array $scopes)
291291
* @param \DateTimeInterface|\DateInterval|null $date
292292
* @return \DateInterval|static
293293
*/
294-
public static function tokensExpireIn(DateTimeInterface|DateInterval $date = null)
294+
public static function tokensExpireIn(DateTimeInterface|DateInterval|null $date = null)
295295
{
296296
if (is_null($date)) {
297297
return static::$tokensExpireIn ?? new DateInterval('P1Y');
@@ -310,7 +310,7 @@ public static function tokensExpireIn(DateTimeInterface|DateInterval $date = nul
310310
* @param \DateTimeInterface|\DateInterval|null $date
311311
* @return \DateInterval|static
312312
*/
313-
public static function refreshTokensExpireIn(DateTimeInterface|DateInterval $date = null)
313+
public static function refreshTokensExpireIn(DateTimeInterface|DateInterval|null $date = null)
314314
{
315315
if (is_null($date)) {
316316
return static::$refreshTokensExpireIn ?? new DateInterval('P1Y');
@@ -329,7 +329,7 @@ public static function refreshTokensExpireIn(DateTimeInterface|DateInterval $dat
329329
* @param \DateTimeInterface|\DateInterval|null $date
330330
* @return \DateInterval|static
331331
*/
332-
public static function personalAccessTokensExpireIn(DateTimeInterface|DateInterval $date = null)
332+
public static function personalAccessTokensExpireIn(DateTimeInterface|DateInterval|null $date = null)
333333
{
334334
if (is_null($date)) {
335335
return static::$personalAccessTokensExpireIn ?? new DateInterval('P1Y');

tests/Feature/AccessTokenControllerTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ public function __construct($idToken)
292292
}
293293

294294
/**
295-
* @inheritdoc
295+
* {@inheritdoc}
296296
*/
297297
protected function getExtraParams(\League\OAuth2\Server\Entities\AccessTokenEntityInterface $accessToken)
298298
{

0 commit comments

Comments
 (0)