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 26, 2024
1 parent c8481c1 commit 8a7df4e
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.0', '8.1', '8.2', '8.3']
php: ['8.0', '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.0 - 8.3",
"php": "8.0 - 8.4",
"ext-json": "*"
},
"require-dev": {
Expand Down
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Install via Composer:
composer require nette/neon
```

It requires PHP version 8.0 up to 8.3. Documentation can be found on the [website](https://doc.nette.org/neon).
It requires PHP version 8.0 up to 8.4. Documentation can be found on the [website](https://doc.nette.org/neon).

`Neon::encode()` returns `$value` converted to NEON. As the second parameter `$blockMode` you can pass true, which will create multiline output. The third parameter `$indentation` specifies the characters used for indentation (default is tab).

Expand Down
2 changes: 1 addition & 1 deletion src/Neon/Parser.php
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ private function checkArrayKey(Node $key, array &$arr): void
}


private function injectPos(Node $node, int $start = null, int $end = null): Node
private function injectPos(Node $node, ?int $start = null, ?int $end = null): Node
{
$node->startTokenPos = $start ?? $this->tokens->getPos();
$node->startLine = $this->posToLine[$node->startTokenPos];
Expand Down

0 comments on commit 8a7df4e

Please sign in to comment.