From 8843f6a5a44665f66da81491d80b9183082bb145 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 11 Nov 2024 23:26:00 +0000 Subject: [PATCH 1/3] Update phpstan/phpstan requirement from ^1 to ^2 Updates the requirements on [phpstan/phpstan](https://github.com/phpstan/phpstan) to permit the latest version. - [Release notes](https://github.com/phpstan/phpstan/releases) - [Changelog](https://github.com/phpstan/phpstan/blob/2.0.x/CHANGELOG.md) - [Commits](https://github.com/phpstan/phpstan/compare/1.0.0...2.0.1) --- updated-dependencies: - dependency-name: phpstan/phpstan dependency-type: direct:development ... Signed-off-by: dependabot[bot] --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 829bc665..af66bf29 100644 --- a/composer.json +++ b/composer.json @@ -49,7 +49,7 @@ "illuminate/routing": "^10|^11", "orchestra/testbench": "^8|^9", "mockery/mockery": "^1.4.4", - "phpstan/phpstan": "^1", + "phpstan/phpstan": "^2", "phpunit/phpunit": "^10.5|^11" }, "autoload": { From 4f0692a8c29bed387d67f245045e383910d4996d Mon Sep 17 00:00:00 2001 From: Max Date: Tue, 31 Dec 2024 00:10:44 +1100 Subject: [PATCH 2/3] update stub file for phpstan 2 --- tests/Stubs/LaravelUserStub.php | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/tests/Stubs/LaravelUserStub.php b/tests/Stubs/LaravelUserStub.php index 83e25547..62dd8844 100644 --- a/tests/Stubs/LaravelUserStub.php +++ b/tests/Stubs/LaravelUserStub.php @@ -17,31 +17,36 @@ class LaravelUserStub extends UserStub implements Authenticatable, JWTSubject { - public function getAuthIdentifierName() + public function getAuthIdentifierName(): string { + return ''; } public function getAuthIdentifier() { } - public function getAuthPasswordName() + public function getAuthPasswordName(): string { + return ''; } - public function getAuthPassword() + public function getAuthPassword(): string { + return ''; } - public function getRememberToken() + public function getRememberToken(): string { + return ''; } public function setRememberToken($value) { } - public function getRememberTokenName() + public function getRememberTokenName(): string { + return ''; } } From 8da46d78d2b0c7c8e385cee638577ae11a08da6d Mon Sep 17 00:00:00 2001 From: Max Date: Tue, 31 Dec 2024 00:21:27 +1100 Subject: [PATCH 3/3] Fix up stub --- phpstan-baseline.neon | 25 ------------------------- tests/Stubs/JWTProviderStub.php | 2 +- 2 files changed, 1 insertion(+), 26 deletions(-) diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index ea4e0664..72ea99ab 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -60,28 +60,3 @@ parameters: count: 2 path: tests/Providers/LaravelServiceProviderTest.php - - - message: "#^Method PHPOpenSourceSaver\\\\JWTAuth\\\\Test\\\\Stubs\\\\LaravelUserStub\\:\\:getAuthIdentifierName\\(\\) should return string but return statement is missing\\.$#" - count: 1 - path: tests/Stubs/LaravelUserStub.php - - - - message: "#^Method PHPOpenSourceSaver\\\\JWTAuth\\\\Test\\\\Stubs\\\\LaravelUserStub\\:\\:getAuthPassword\\(\\) should return string but return statement is missing\\.$#" - count: 1 - path: tests/Stubs/LaravelUserStub.php - - - - message: "#^Method PHPOpenSourceSaver\\\\JWTAuth\\\\Test\\\\Stubs\\\\LaravelUserStub\\:\\:getAuthPasswordName\\(\\) should return string but return statement is missing\\.$#" - count: 1 - path: tests/Stubs/LaravelUserStub.php - - - - message: "#^Method PHPOpenSourceSaver\\\\JWTAuth\\\\Test\\\\Stubs\\\\LaravelUserStub\\:\\:getRememberToken\\(\\) should return string but return statement is missing\\.$#" - count: 1 - path: tests/Stubs/LaravelUserStub.php - - - - message: "#^Method PHPOpenSourceSaver\\\\JWTAuth\\\\Test\\\\Stubs\\\\LaravelUserStub\\:\\:getRememberTokenName\\(\\) should return string but return statement is missing\\.$#" - count: 1 - path: tests/Stubs/LaravelUserStub.php - diff --git a/tests/Stubs/JWTProviderStub.php b/tests/Stubs/JWTProviderStub.php index a5e64a79..d6282c69 100644 --- a/tests/Stubs/JWTProviderStub.php +++ b/tests/Stubs/JWTProviderStub.php @@ -16,7 +16,7 @@ class JWTProviderStub extends Provider { - protected function isAsymmetric() + protected function isAsymmetric(): bool { return false; }