Skip to content

Commit fabfb9e

Browse files
committed
support for PHP 8.4
1 parent 0452960 commit fabfb9e

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

.github/workflows/tests.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
runs-on: ubuntu-latest
88
strategy:
99
matrix:
10-
php: ['7.1', '7.2', '7.3', '7.4', '8.0', '8.1']
10+
php: ['7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4']
1111

1212
fail-fast: false
1313

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
}
1616
],
1717
"require": {
18-
"php": ">=7.1",
18+
"php": "7.1 - 8.4",
1919
"ext-json": "*"
2020
},
2121
"require-dev": {

readme.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Install via Composer:
3737
composer require nette/neon
3838
```
3939

40-
It requires PHP version 7.1 and supports PHP up to 8.1. Documentation can be found on the [website](https://doc.nette.org/neon).
40+
It requires PHP version 7.1 up to 8.4. Documentation can be found on the [website](https://doc.nette.org/neon).
4141

4242
`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).
4343

src/Neon/Parser.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ private function checkArrayKey(Node $key, array &$arr): void
236236
}
237237

238238

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

tests/Neon/Parser.nodes.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ Assert::matchFile(
5656

5757
$traverser = new Traverser;
5858
$traverser->traverse($node, function (Node $node) use ($stream) {
59-
$node->code = '';
59+
@$node->code = ''; // dynamic property is deprecated
6060
foreach (array_slice($stream->getTokens(), $node->startTokenPos, $node->endTokenPos - $node->startTokenPos + 1) as $token) {
6161
$node->code .= $token->value;
6262
}

0 commit comments

Comments
 (0)