diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 9f3ceee..296194d 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -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 diff --git a/composer.json b/composer.json index df8ad21..d2971d2 100644 --- a/composer.json +++ b/composer.json @@ -15,7 +15,7 @@ } ], "require": { - "php": "8.0 - 8.3", + "php": "8.0 - 8.4", "ext-json": "*" }, "require-dev": { diff --git a/readme.md b/readme.md index ab46729..491b70d 100644 --- a/readme.md +++ b/readme.md @@ -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). diff --git a/src/Neon/Parser.php b/src/Neon/Parser.php index f53eca1..a2a4a1c 100644 --- a/src/Neon/Parser.php +++ b/src/Neon/Parser.php @@ -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];