diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 9b70642..254cd22 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.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", 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);