Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[12.x] Supports PHP 8.4 #1799

Draft
wants to merge 3 commits into
base: 12.x
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 13 additions & 11 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,20 @@ jobs:
strategy:
fail-fast: true
matrix:
php: ['8.0', 8.1, 8.2, 8.3]
laravel: [9, 10, 11]
exclude:
- php: '8.0'
laravel: 10
php: [8.1, 8.2, 8.3, 8.4]
laravel: [10, 11]
include:
- php: 8.2
laravel: 9
- php: 8.1
laravel: 9
- php: '8.0'
laravel: 11
laravel: 9
exclude:
- php: 8.1
laravel: 11
- php: 8.3
laravel: 9
- php: 8.4
laravel: 10

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

Expand All @@ -45,8 +48,7 @@ jobs:

- name: Install dependencies
run: |
composer require "illuminate/contracts=^${{ matrix.laravel }}" --no-update
composer update --prefer-dist --no-interaction --no-progress
composer update --prefer-dist --no-interaction --no-progress --with="illuminate/contracts=^${{ matrix.laravel }}"

- name: Execute tests
run: vendor/bin/phpunit
run: vendor/bin/phpunit ${{ matrix.laravel >= 10 && '--display-deprecations --fail-on-deprecation' || '' }}
6 changes: 3 additions & 3 deletions src/Passport.php
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ public static function tokensCan(array $scopes)
* @param \DateTimeInterface|\DateInterval|null $date
* @return \DateInterval|static
*/
public static function tokensExpireIn(DateTimeInterface|DateInterval $date = null)
public static function tokensExpireIn(DateTimeInterface|DateInterval|null $date = null)
{
if (is_null($date)) {
return static::$tokensExpireIn ?? new DateInterval('P1Y');
Expand All @@ -310,7 +310,7 @@ public static function tokensExpireIn(DateTimeInterface|DateInterval $date = nul
* @param \DateTimeInterface|\DateInterval|null $date
* @return \DateInterval|static
*/
public static function refreshTokensExpireIn(DateTimeInterface|DateInterval $date = null)
public static function refreshTokensExpireIn(DateTimeInterface|DateInterval|null $date = null)
{
if (is_null($date)) {
return static::$refreshTokensExpireIn ?? new DateInterval('P1Y');
Expand All @@ -329,7 +329,7 @@ public static function refreshTokensExpireIn(DateTimeInterface|DateInterval $dat
* @param \DateTimeInterface|\DateInterval|null $date
* @return \DateInterval|static
*/
public static function personalAccessTokensExpireIn(DateTimeInterface|DateInterval $date = null)
public static function personalAccessTokensExpireIn(DateTimeInterface|DateInterval|null $date = null)
{
if (is_null($date)) {
return static::$personalAccessTokensExpireIn ?? new DateInterval('P1Y');
Expand Down
2 changes: 1 addition & 1 deletion tests/Feature/AccessTokenControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ public function __construct($idToken)
}

/**
* @inheritdoc
* {@inheritdoc}
*/
protected function getExtraParams(\League\OAuth2\Server\Entities\AccessTokenEntityInterface $accessToken)
{
Expand Down
Loading