From 410c3f9416a339d6730808c0fabb766b1abbae02 Mon Sep 17 00:00:00 2001 From: Marco Rieger Date: Thu, 26 Nov 2020 18:14:37 +0100 Subject: [PATCH] PHP8 (#5) * add php8 to test suite * skip test on php 8 since function will now error out --- .github/workflows/main.yml | 2 +- composer.json | 2 +- tests/VaultPHP/Exceptions/ExceptionsTest.php | 5 ++++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f5b83f7..d6c06df 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -9,7 +9,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - php-versions: ['5.6', '7.4'] + php-versions: ['5.6', '7.4', '8.0'] name: Testing PHP ${{ matrix.php-versions }} steps: - name: Checkout diff --git a/composer.json b/composer.json index c74b21e..b4c6d89 100644 --- a/composer.json +++ b/composer.json @@ -7,7 +7,7 @@ "require": { "ext-json": "*", "guzzlehttp/psr7": "^1.6", - "php": "^5.6 || ^7.0", + "php": "^5.6 || ^7.0 || ^8.0", "php-http/httplug": ">=1.1.0" }, "suggest": { diff --git a/tests/VaultPHP/Exceptions/ExceptionsTest.php b/tests/VaultPHP/Exceptions/ExceptionsTest.php index 908821d..8762a2c 100644 --- a/tests/VaultPHP/Exceptions/ExceptionsTest.php +++ b/tests/VaultPHP/Exceptions/ExceptionsTest.php @@ -92,7 +92,10 @@ public function testSendRequestWillThrow() { $client = new VaultClient($httpClient, $auth, TEST_VAULT_ENDPOINT); $client->sendApiRequest('GET', '/foo', EndpointResponse::class); } - + + /** + * @requires PHP <= 7.4 + */ public function testWillThrowWhenReturnClassDeclarationIsInvalid() { $this->expectException(VaultException::class); $this->expectExceptionMessage('Return Class declaration lacks static::fromResponse');