From b4d0a88dce30b26011dbfa63e9dd2d1455118e6e Mon Sep 17 00:00:00 2001 From: Markus Podar Date: Sun, 18 Feb 2024 15:45:25 +0100 Subject: [PATCH 1/4] Revert "phpstan: ignore phpunit10 deprecations for now" This reverts commit 1e283cb433136255f4946342fb4b55f0fab37b96. --- phpstan.neon | 3 --- 1 file changed, 3 deletions(-) diff --git a/phpstan.neon b/phpstan.neon index 35d8647..1cb9ff8 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -14,9 +14,6 @@ parameters: - message: "#Method .* throws checked exception .* but it's missing from the PHPDoc @throws tag.#" paths: - tests/* - - message: "#@dataProvider .* related method must be static in PHPUnit 10 and newer.#" - paths: - - tests/* # Install https://plugins.jetbrains.com/plugin/7677-awesome-console to make those links clickable editorUrl: '%%relFile%%:%%line%%' editorUrlTitle: '%%relFile%%:%%line%%' From 3edfc380143c83a9e34a7eda28e3e8abbbea7e73 Mon Sep 17 00:00:00 2001 From: Markus Podar Date: Sun, 18 Feb 2024 15:48:17 +0100 Subject: [PATCH 2/4] tests: make dataprovider static --- tests/Unit/RequestParserTest.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/Unit/RequestParserTest.php b/tests/Unit/RequestParserTest.php index 84857e2..a4834ca 100644 --- a/tests/Unit/RequestParserTest.php +++ b/tests/Unit/RequestParserTest.php @@ -46,7 +46,7 @@ public function testPostWithJsonLike(string $contentType): void /** * @return iterable */ - public function jsonLikeContentTypes(): iterable + public static function jsonLikeContentTypes(): iterable { yield ['application/json']; yield ['application/graphql+json']; @@ -75,7 +75,7 @@ public function testPostWithQueryApplicationGraphQL(string $contentType): void /** * @return iterable */ - public function graphQLContentTypes(): iterable + public static function graphQLContentTypes(): iterable { yield ['application/graphql']; yield ['application/graphql;charset=UTF-8']; @@ -103,7 +103,7 @@ public function testPostWithRegularForm(string $contentType): void /** * @return iterable */ - public function formContentTypes(): iterable + public static function formContentTypes(): iterable { yield ['application/x-www-form-urlencoded']; yield ['application/x-www-form-urlencoded;bla;blub']; @@ -166,7 +166,7 @@ public function testNonsensicalContentTypes(string $contentType): void /** * @return iterable */ - public function nonsensicalContentTypes(): iterable + public static function nonsensicalContentTypes(): iterable { yield ['foobar']; yield ['application/foobar']; @@ -263,7 +263,7 @@ public function testMultipartFormRequest(string $contentType): void /** * @return iterable */ - public function multipartFormContentTypes(): iterable + public static function multipartFormContentTypes(): iterable { yield ['multipart/form-data']; yield ['multipart/form-data; boundary=----WebkitFormBoundaryasodfh98ho1hfdsdfadfNX']; From 3a5b93b82570c55a91526970fcf41b8f24ca1fbd Mon Sep 17 00:00:00 2001 From: Markus Podar Date: Sun, 18 Feb 2024 15:53:06 +0100 Subject: [PATCH 3/4] phpunit: migrate configuration --- phpunit.xml | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/phpunit.xml b/phpunit.xml index aa74bf2..a7f5136 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -1,18 +1,17 @@ - - - - src - - - tests/Unit + + + src + + From ee07a3a183de2ace125e1124db6d88fff3ec1d9e Mon Sep 17 00:00:00 2001 From: Markus Podar Date: Sun, 18 Feb 2024 15:56:14 +0100 Subject: [PATCH 4/4] gha: bump to latest stable PHP version where possible --- .github/workflows/autoformat.yml | 2 +- .github/workflows/continuous-integration.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/autoformat.yml b/.github/workflows/autoformat.yml index ae7577a..e81b47e 100644 --- a/.github/workflows/autoformat.yml +++ b/.github/workflows/autoformat.yml @@ -16,7 +16,7 @@ jobs: with: coverage: none extensions: mbstring - php-version: 8.1 + php-version: 8.3 - run: composer install --no-interaction --no-progress --no-suggest diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 9343786..fbf7891 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -16,7 +16,7 @@ jobs: - name: "Install PHP with extensions" uses: shivammathur/setup-php@v2 with: - php-version: 8.1 + php-version: 8.3 - name: "Install locked dependencies with composer" run: composer install --no-interaction --no-progress @@ -144,7 +144,7 @@ jobs: uses: shivammathur/setup-php@v2 with: coverage: pcov - php-version: 8.1 + php-version: 8.3 - name: "Install locked dependencies with composer" run: composer install --no-interaction --no-progress