diff --git a/composer.json b/composer.json index 164dd4f..822bedc 100644 --- a/composer.json +++ b/composer.json @@ -12,12 +12,12 @@ ], "minimum-stability": "dev", "require": { - "php": "^7.4 | ^8.0", + "php": "^8.0", "ext-dom": "*", "ext-json": "*", "codeception/codeception": "^5.0.0-alpha1", "justinrainbow/json-schema": "~5.2.9", - "softcreatr/jsonpath": "^0.7 | ^0.8" + "softcreatr/jsonpath": "^0.8" }, "require-dev": { "ext-libxml": "*", diff --git a/readme.md b/readme.md index 84e9168..ceaef61 100644 --- a/readme.md +++ b/readme.md @@ -9,7 +9,7 @@ A REST module for Codeception ## Requirements -* `PHP 7.4` or higher. +* `PHP 8` or higher. ## Installation diff --git a/src/Codeception/Util/JsonArray.php b/src/Codeception/Util/JsonArray.php index 97b783b..f85fa17 100644 --- a/src/Codeception/Util/JsonArray.php +++ b/src/Codeception/Util/JsonArray.php @@ -18,12 +18,8 @@ class JsonArray protected ?DOMDocument $jsonXml = null; - public function __construct($jsonString) + public function __construct(string $jsonString) { - if (!is_string($jsonString)) { - throw new InvalidArgumentException('$jsonString param must be a string.'); - } - $jsonDecode = json_decode($jsonString, true); if (!is_array($jsonDecode)) {