diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index c709a017..18bc8ca6 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -9,15 +9,8 @@ jobs: strategy: fail-fast: false matrix: - php: [7.2, 7.3, 7.4] + php: [8.0, 8.1, 8.2, 8.3] coverage: ["true"] - include: - - php: 8.0 - coverage: "false" # PHPUnit 8.5.14 doesn't support code coverage under PHP 8 - - php: 8.1 - coverage: "false" # PHPUnit 8.5.14 doesn't support code coverage under PHP 8 - - php: 8.2 - coverage: "false" # PHPUnit 8.5.14 doesn't support code coverage under PHP 8 steps: - name: Checkout diff --git a/composer.json b/composer.json index baa8b30b..15b54a4a 100644 --- a/composer.json +++ b/composer.json @@ -4,29 +4,29 @@ "type": "library", "license": "GPL-2.0-only", "require": { - "php": ">=7.2.0", + "php": ">=8.0.0", "ext-json": "*", "ext-openssl": "*", - "codercat/jwk-to-pem": "^1.0", - "guzzlehttp/guzzle": "^6.5 || ^7.0", - "lcobucci/jwt": "^3.4 || ^4.1.5", - "league/oauth2-server": "^8.2", - "nesbot/carbon": "^2.43", - "nyholm/psr7": "^1.3", + "codercat/jwk-to-pem": "^1.1", + "guzzlehttp/guzzle": "^7.8", + "lcobucci/jwt": "^4.3", + "league/oauth2-server": "^8.5", + "nesbot/carbon": "^2.72", + "nyholm/psr7": "^1.8", "php-http/message-factory": "^1.1", "phpseclib/phpseclib": "^3.0.34", - "psr/cache": "^1.0 || ^2.0 || ^3.0", - "psr/http-message": "^1.0", + "psr/cache": "^2.0 || ^3.0", + "psr/http-message": "^1.1", "psr/http-server-handler": "^1.0", "psr/log": "^1.0 || ^2.0 || ^3.0", - "ramsey/uuid": "^3.9 || ^4" + "ramsey/uuid": "^3.9 || ^4.7" }, "require-dev": { - "cache/array-adapter": "^1.1", - "phpunit/phpunit": "8.5.14", - "php-coveralls/php-coveralls": "^2.4", - "psalm/plugin-phpunit": "^0.15.1", - "vimeo/psalm": "^4.6" + "cache/array-adapter": "^1.2", + "phpunit/phpunit": "^9.6", + "php-coveralls/php-coveralls": "^2.7", + "psalm/plugin-phpunit": "^0.15", + "vimeo/psalm": "^4.30" }, "autoload": { "psr-4": { diff --git a/tests/Unit/Security/Jwks/Fetcher/JwksFetcherTest.php b/tests/Unit/Security/Jwks/Fetcher/JwksFetcherTest.php index a7afdaa1..697235e4 100644 --- a/tests/Unit/Security/Jwks/Fetcher/JwksFetcherTest.php +++ b/tests/Unit/Security/Jwks/Fetcher/JwksFetcherTest.php @@ -74,16 +74,13 @@ public function testItLogCacheFetchAndSaveErrors(): void $exporter = new JwksExporter(new KeyChainRepository([$keyChain])); $this->cacheMock - ->expects($this->at(0)) + ->expects($this->exactly(2)) ->method('getItem') ->with($cacheKey) - ->willThrowException(new Exception('cache fetch error')); - - $this->cacheMock - ->expects($this->at(1)) - ->method('getItem') - ->with($cacheKey) - ->willReturn(new CacheItem($cacheKey)); + ->willReturnOnConsecutiveCalls( + $this->throwException(new Exception('cache fetch error')), + new CacheItem($cacheKey) + ); $this->cacheMock ->expects($this->once())