Skip to content

Commit

Permalink
support for PHP 8.4
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed Jun 18, 2024
1 parent 97cdfae commit 8847619
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
php: ['8.1', '8.2', '8.3']
php: ['8.1', '8.2', '8.3', '8.4']

fail-fast: false

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
}
],
"require": {
"php": "8.1 - 8.3",
"php": "8.1 - 8.4",
"nette/utils": "^4.0"
},
"require-dev": {
Expand Down
2 changes: 1 addition & 1 deletion src/Schema/Elements/Type.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public function max(?float $max): self
/**
* @internal use arrayOf() or listOf()
*/
public function items(string|Schema $valueType = 'mixed', string|Schema $keyType = null): self
public function items(string|Schema $valueType = 'mixed', string|Schema|null $keyType = null): self
{
$this->itemsValue = $valueType instanceof Schema
? $valueType
Expand Down
2 changes: 1 addition & 1 deletion src/Schema/Expect.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public static function from(object $object, array $items = []): Structure
}


public static function arrayOf(string|Schema $valueType, string|Schema $keyType = null): Type
public static function arrayOf(string|Schema $valueType, string|Schema|null $keyType = null): Type
{
return (new Type('array'))->items($valueType, $keyType);
}
Expand Down

0 comments on commit 8847619

Please sign in to comment.