Skip to content

Commit

Permalink
Test against PHP 8.2 + 8.3 (#101)
Browse files Browse the repository at this point in the history
* Test against PHP 8.2 + 8.3
* Define nullable parameter types explicitly
* Drop support for PHP 8.0
  • Loading branch information
W0rma authored Jul 11, 2024
1 parent 86b853d commit 727823a
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:

strategy:
matrix:
php: [8.0, 8.1]
php: [8.1, 8.2, 8.3]

steps:
- name: Checkout code
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
],
"homepage": "https://codeception.com/",
"require": {
"php": "^8.0",
"php": "^8.1",
"ext-dom": "*",
"ext-json": "*",
"codeception/codeception": "^5.0.8",
Expand Down
4 changes: 2 additions & 2 deletions src/Codeception/Module/REST.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion src/Codeception/Step/AsJson.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 727823a

Please sign in to comment.