Skip to content

Commit e20c80d

Browse files
try phpunit 12 and phpstan 2
1 parent 641803c commit e20c80d

File tree

3 files changed

+12
-6
lines changed

3 files changed

+12
-6
lines changed

composer.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@
1616
"psr/http-server-middleware": "^1.0"
1717
},
1818
"require-dev": {
19-
"phpunit/phpunit": "^10.5|^11.5",
19+
"phpunit/phpunit": "^10.5|^11.5|^12.0",
2020
"laminas/laminas-diactoros": "^3.5",
21-
"phpstan/phpstan": "^1.12",
22-
"phpstan/phpstan-phpunit": "^1.3.15",
21+
"phpstan/phpstan": "^1.12|^2.0",
22+
"phpstan/phpstan-phpunit": "^1.3.15|^2.0",
2323
"roave/security-advisories": "dev-master",
2424
"phpstan/extension-installer": "^1.3.1",
25-
"phpstan/phpstan-deprecation-rules": "^1.1.4",
26-
"phpstan/phpstan-strict-rules": "^1.5.2",
25+
"phpstan/phpstan-deprecation-rules": "^1.1.4|^2.0",
26+
"phpstan/phpstan-strict-rules": "^1.5.2|^2.0",
2727
"slevomat/coding-standard": "^8.14.1",
2828
"php-parallel-lint/php-parallel-lint": "^1.3.2",
2929
"squizlabs/php_codesniffer": "^3.8"

src/Grant/AuthCodeGrant.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,11 @@ private function validateCodeChallenge(object $authCodePayload, ?string $codeVer
175175
if (isset($this->codeChallengeVerifiers[$authCodePayload->code_challenge_method])) {
176176
$codeChallengeVerifier = $this->codeChallengeVerifiers[$authCodePayload->code_challenge_method];
177177

178-
if (!isset($authCodePayload->code_challenge) || $codeChallengeVerifier->verifyCodeChallenge($codeVerifier, $authCodePayload->code_challenge) === false) {
178+
if (
179+
!property_exists($authCodePayload, 'code_challenge') ||
180+
!isset($authCodePayload->code_challenge) ||
181+
$codeChallengeVerifier->verifyCodeChallenge($codeVerifier, $authCodePayload->code_challenge) === false
182+
) {
179183
throw OAuthServerException::invalidGrant('Failed to verify `code_verifier`.');
180184
}
181185
} else {

tests/Stubs/ScopeEntity.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,13 @@
66

77
use League\OAuth2\Server\Entities\ScopeEntityInterface;
88
use League\OAuth2\Server\Entities\Traits\EntityTrait;
9+
use League\OAuth2\Server\Entities\Traits\ScopeTrait;
910
use ReturnTypeWillChange;
1011

1112
class ScopeEntity implements ScopeEntityInterface
1213
{
1314
use EntityTrait;
15+
use ScopeTrait;
1416

1517
#[ReturnTypeWillChange]
1618
public function jsonSerialize(): string

0 commit comments

Comments
 (0)