From 12334604e8f070f710e8472cb15da0b31067e583 Mon Sep 17 00:00:00 2001 From: W0rma Date: Fri, 15 Mar 2024 08:52:57 +0100 Subject: [PATCH 1/3] Test against PHP 8.2 + 8.3 --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 9b70642..4bdb921 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -11,7 +11,7 @@ jobs: strategy: matrix: - php: [8.0, 8.1] + php: [8.0, 8.1, 8.2, 8.3] steps: - name: Checkout code From 993c2948bece8401fd00cee14309a9ae79b6e0d3 Mon Sep 17 00:00:00 2001 From: W0rma Date: Fri, 15 Mar 2024 09:04:44 +0100 Subject: [PATCH 2/3] Define nullable parameter types explicitly Not doing so will become deprecated in PHP 8.4 --- src/Codeception/Module/REST.php | 4 ++-- src/Codeception/Step/AsJson.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Codeception/Module/REST.php b/src/Codeception/Module/REST.php index d5e78b9..d75b464 100644 --- a/src/Codeception/Module/REST.php +++ b/src/Codeception/Module/REST.php @@ -1330,7 +1330,7 @@ public function dontSeeResponseContainsJson(array $json = []): void * @part json * @see JsonType */ - public function seeResponseMatchesJsonType(array $jsonType, string $jsonPath = null): void + public function seeResponseMatchesJsonType(array $jsonType, ?string $jsonPath = null): void { $jsonArray = new JsonArray($this->connectionModule->_getResponseContent()); if ($jsonPath) { @@ -1347,7 +1347,7 @@ public function seeResponseMatchesJsonType(array $jsonType, string $jsonPath = n * @param array $jsonType JsonType structure * @see seeResponseMatchesJsonType */ - public function dontSeeResponseMatchesJsonType(array $jsonType, string $jsonPath = null): void + public function dontSeeResponseMatchesJsonType(array $jsonType, ?string $jsonPath = null): void { $jsonArray = new JsonArray($this->connectionModule->_getResponseContent()); if ($jsonPath) { diff --git a/src/Codeception/Step/AsJson.php b/src/Codeception/Step/AsJson.php index 78acdf2..636a662 100644 --- a/src/Codeception/Step/AsJson.php +++ b/src/Codeception/Step/AsJson.php @@ -7,7 +7,7 @@ class AsJson extends Action implements GeneratedStep { - public function run(ModuleContainer $container = null) + public function run(?ModuleContainer $container = null) { $container->getModule('REST')->haveHttpHeader('Content-Type', 'application/json'); $resp = parent::run($container); From e6f79e46b465cd5a8c324014ada5044bf2d676d0 Mon Sep 17 00:00:00 2001 From: W0rma Date: Thu, 11 Jul 2024 07:27:35 +0200 Subject: [PATCH 3/3] Drop support for PHP 8.0 --- .github/workflows/main.yml | 2 +- composer.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4bdb921..254cd22 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -11,7 +11,7 @@ jobs: strategy: matrix: - php: [8.0, 8.1, 8.2, 8.3] + php: [8.1, 8.2, 8.3] steps: - name: Checkout code diff --git a/composer.json b/composer.json index bbe4d89..5c12b32 100644 --- a/composer.json +++ b/composer.json @@ -14,7 +14,7 @@ ], "homepage": "https://codeception.com/", "require": { - "php": "^8.0", + "php": "^8.1", "ext-dom": "*", "ext-json": "*", "codeception/codeception": "^5.0.8",