From c6ad07f64913c7e77259db98a510f2452cc41882 Mon Sep 17 00:00:00 2001 From: Erison Silva Date: Mon, 6 Dec 2021 19:13:39 -0300 Subject: [PATCH 1/3] Removed return type for createClient --- src/ApiPlatform.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/ApiPlatform.php b/src/ApiPlatform.php index 2018809..4e54ea2 100644 --- a/src/ApiPlatform.php +++ b/src/ApiPlatform.php @@ -5,7 +5,6 @@ namespace Eerison\PestPluginApiPlatform; use ApiPlatform\Core\Bridge\Symfony\Bundle\Test\ApiTestCase; -use ApiPlatform\Core\Bridge\Symfony\Bundle\Test\Client; /** * @internal @@ -18,8 +17,13 @@ final class ApiPlatform extends ApiTestCase /** * @param array $kernelOptions * @param array $defaultOptions + * I'm ignoring this return to be compatible with api plat form 2 and 3 + * error: Eerison\PestPluginApiPlatform\ApiPlatform::createApiClient(): + * Return value must be of type ApiPlatform\Core\Bridge\Symfony\Bundle\Test\Client, + * ApiPlatform\Symfony\Bundle\Test\Client returned + * @phpstan-ignore-next-line */ - public static function createApiClient(array $kernelOptions = [], array $defaultOptions = []): Client + public static function createApiClient(array $kernelOptions = [], array $defaultOptions = []) { return parent::createClient($kernelOptions, $defaultOptions); } From 077f793a0468c8f5812b8fffdf3201d47f1657e2 Mon Sep 17 00:00:00 2001 From: Erison Silva Date: Mon, 6 Dec 2021 19:18:39 -0300 Subject: [PATCH 2/3] enabled php 8.1 --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index aee83d7..61e93d0 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -8,7 +8,7 @@ jobs: strategy: matrix: os: [ubuntu-latest, windows-latest] - php: ['7.4', '8.0'] + php: ['7.4', '8.0', '8.1'] dependency-version: [prefer-stable] name: PHP ${{ matrix.php }} - ${{ matrix.os }} - ${{ matrix.dependency-version }} From c065c2a86ec0c56bb45333903e830d7cbef7f219 Mon Sep 17 00:00:00 2001 From: Erison Silva Date: Mon, 6 Dec 2021 19:19:11 -0300 Subject: [PATCH 3/3] enabled php 8.1 --- .github/workflows/static.yml | 4 ++-- .github/workflows/tests.yml | 2 +- composer.json | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml index ea1f25c..fcce3b6 100644 --- a/.github/workflows/static.yml +++ b/.github/workflows/static.yml @@ -15,7 +15,7 @@ jobs: - name: Setup PHP uses: shivammathur/setup-php@v2 with: - php-version: 7.4 + php-version: 8.0 tools: composer:v2 coverage: none @@ -40,7 +40,7 @@ jobs: - name: Setup PHP uses: shivammathur/setup-php@v2 with: - php-version: 7.4 + php-version: 8.0 tools: composer:v2 coverage: none diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 61e93d0..91e889c 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -8,7 +8,7 @@ jobs: strategy: matrix: os: [ubuntu-latest, windows-latest] - php: ['7.4', '8.0', '8.1'] + php: ['8.0', '8.1'] dependency-version: [prefer-stable] name: PHP ${{ matrix.php }} - ${{ matrix.os }} - ${{ matrix.dependency-version }} diff --git a/composer.json b/composer.json index b1878ee..a229417 100644 --- a/composer.json +++ b/composer.json @@ -13,7 +13,7 @@ ], "license": "MIT", "require": { - "php": "^7.4 || ^8.0", + "php": "^8.0", "api-platform/core": "^2.6", "pestphp/pest": "^1.0", "pestphp/pest-plugin": "^1.0"