From 0a430dfac559ff16057e00e8c3a60c359ba23378 Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Wed, 13 Nov 2024 18:17:46 +0800 Subject: [PATCH 1/5] [12.x] Supports PHP 8.4 --- .github/workflows/tests.yml | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 7ca8da38a..e4a43cd74 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -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 }} @@ -45,8 +48,12 @@ 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 --display-deprecations --fail-on-deprecation + if: matrix.laravel >= 10 - name: Execute tests run: vendor/bin/phpunit + if: matrix.laravel < 10 From 3807c90097bead3f25d47014b9574741316ef4d0 Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Wed, 13 Nov 2024 18:23:40 +0800 Subject: [PATCH 2/5] wip Signed-off-by: Mior Muhammad Zaki --- src/Passport.php | 6 +++--- tests/Feature/AccessTokenControllerTest.php | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Passport.php b/src/Passport.php index ccfe6455d..9cffe810a 100644 --- a/src/Passport.php +++ b/src/Passport.php @@ -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'); @@ -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'); @@ -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'); diff --git a/tests/Feature/AccessTokenControllerTest.php b/tests/Feature/AccessTokenControllerTest.php index 39d763983..41375e750 100644 --- a/tests/Feature/AccessTokenControllerTest.php +++ b/tests/Feature/AccessTokenControllerTest.php @@ -292,7 +292,7 @@ public function __construct($idToken) } /** - * @inheritdoc + * {@inheritdoc} */ protected function getExtraParams(\League\OAuth2\Server\Entities\AccessTokenEntityInterface $accessToken) { From 7bf74684348e92453232ae820b30089912374ecb Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Thu, 14 Nov 2024 14:14:14 +0800 Subject: [PATCH 3/5] Update tests.yml --- .github/workflows/tests.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index e4a43cd74..e27fda6fe 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -51,9 +51,4 @@ jobs: composer update --prefer-dist --no-interaction --no-progress --with="illuminate/contracts=^${{ matrix.laravel }}" - name: Execute tests - run: vendor/bin/phpunit --display-deprecations --fail-on-deprecation - if: matrix.laravel >= 10 - - - name: Execute tests - run: vendor/bin/phpunit - if: matrix.laravel < 10 + run: vendor/bin/phpunit ${{ matrix.laravel >= 10 && '--display-deprecations --fail-on-deprecation' || '' }} From aba42a67b8d41a5ce87c01bd90ac356da7360d89 Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Mon, 16 Dec 2024 16:01:03 +0800 Subject: [PATCH 4/5] wip Signed-off-by: Mior Muhammad Zaki --- .styleci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.styleci.yml b/.styleci.yml index 215fbcfe3..928888750 100644 --- a/.styleci.yml +++ b/.styleci.yml @@ -1,4 +1,6 @@ php: preset: laravel + enabled: + - nullable_type_declarations js: true css: true From cab776c770f045136a4a1ae8e883c172172efc05 Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Wed, 8 Jan 2025 22:16:47 +0800 Subject: [PATCH 5/5] Update tests.yml --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index e27fda6fe..0af74d7f7 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -51,4 +51,4 @@ jobs: composer update --prefer-dist --no-interaction --no-progress --with="illuminate/contracts=^${{ matrix.laravel }}" - name: Execute tests - run: vendor/bin/phpunit ${{ matrix.laravel >= 10 && '--display-deprecations --fail-on-deprecation' || '' }} + run: vendor/bin/phpunit ${{ matrix.laravel >= 10 && '--display-deprecations' || '' }}