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 9ff5667
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 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 readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Installation:
composer require nette/schema
```

It requires PHP version 8.1 and supports PHP up to 8.3.
It requires PHP version 8.1 and supports PHP up to 8.4.


[Support Me](https://github.com/sponsors/dg)
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

5 comments on commit 9ff5667

@janedbal
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any plans tagging this? Thanks

@dg
Copy link
Member Author

@dg dg commented on 9ff5667 Sep 1, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No later than when PHP 8.4 is released

@janedbal
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reason I'm asking is because it blocks OS libs (like ours) to place PHP 8.4 to CI.

@dg
Copy link
Member Author

@dg dg commented on 9ff5667 Sep 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@janedbal
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thanks!

Please sign in to comment.