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 Aug 6, 2024
1 parent bfc0115 commit 6a01f32
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 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
10 changes: 5 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@
}
],
"require": {
"php": "8.0 - 8.3",
"php": "8.0 - 8.4",
"ext-json": "*",
"ext-tokenizer": "*"
},
"require-dev": {
"nette/tester": "^2.0",
"tracy/tracy": "^2.3",
"nette/utils": "^3.0",
"nette/tester": "^2.5",
"tracy/tracy": "^2.10",
"nette/utils": "^4.0",
"phpstan/phpstan": "^1",
"nette/php-generator": "^3.6 || ^4.0"
"nette/php-generator": "^4.0"
},
"suggest": {
"ext-iconv": "to use filters |reverse, |substring",
Expand Down
2 changes: 1 addition & 1 deletion src/Latte/Compiler/TagLexer.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public function tokenize(string $input, ?Position $position = null): array


/** @return Token[] */
public function tokenizePartially(string $input, Position &$position, int $ofs = null): array
public function tokenizePartially(string $input, Position &$position, ?int $ofs = null): array
{
$this->input = $input;
$this->offset = $ofs ?? $position->offset;
Expand Down
2 changes: 1 addition & 1 deletion src/Latte/Compiler/TemplateParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public function parse(string $template): Nodes\TemplateNode
}


public function parseFragment(callable $resolver, callable $after = null): FragmentNode
public function parseFragment(callable $resolver, ?callable $after = null): FragmentNode
{
$res = new FragmentNode;
$save = [$this->lastResolver, $this->tag];
Expand Down

0 comments on commit 6a01f32

Please sign in to comment.