Skip to content

Commit

Permalink
Allow the package to support PHP 8
Browse files Browse the repository at this point in the history
This change allows oauth-pkce to support PHP up to version 8.1. As part
of that change, the maximum version of PHPUnit has also been updated to the
most recent release. To accommodate the new version of PHPUnit the tests
have been updated to account for deprecations since the previous maximum
PHPUnit version.
  • Loading branch information
settermjd committed Aug 29, 2022
1 parent 0bc7f08 commit 052d51c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
"license": "Apache-2.0",
"keywords": ["oauth", "rfc7636"],
"require": {
"php": "^7.1",
"php": "^7.1 || ~8.0.0 || ~8.1.0",
"ircmaxell/random-lib": "^1.2"
},
"require-dev": {
"phpunit/phpunit": "^7.5"
"phpunit/phpunit": "^9.5"
},
"autoload": {
"psr-4": {
Expand All @@ -22,5 +22,8 @@
},
"config": {
"sort-packages": true
},
"scripts": {
"test": "phpunit --colors=always"
}
}
2 changes: 1 addition & 1 deletion tests/VerifierFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public function test(string $method_name)
$byte_length = 128;
$actual = $this->subject->generate($byte_length, $method_name);

$this->assertInternalType('string', $actual[0]);
$this->assertIsString($actual[0]);
$this->assertSame($byte_length, \strlen($actual[0]));
$this->assertInstanceOf(Challenge::class, $actual[1]);
}
Expand Down

0 comments on commit 052d51c

Please sign in to comment.