Skip to content

Commit 9124157

Browse files
committed
support for PHP 8.3
1 parent 28547a3 commit 9124157

File tree

4 files changed

+7
-6
lines changed

4 files changed

+7
-6
lines changed

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
strategy:
99
matrix:
1010
os: [ubuntu-latest, windows-latest]
11-
php: ['8.0', '8.1', '8.2']
11+
php: ['8.0', '8.1', '8.2', '8.3']
1212

1313
fail-fast: false
1414

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
}
1616
],
1717
"require": {
18-
"php": ">=8.0 <8.3"
18+
"php": ">=8.0 <8.4"
1919
},
2020
"require-dev": {
2121
"nette/tester": "^2.5",

readme.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ The recommended way to install is via Composer:
4040
composer require nette/utils
4141
```
4242

43-
- Nette Utils 4.0 is compatible with PHP 8.0 to 8.2
44-
- Nette Utils 3.2 is compatible with PHP 7.2 to 8.2
43+
- Nette Utils 4.0 is compatible with PHP 8.0 to 8.3
44+
- Nette Utils 3.2 is compatible with PHP 7.2 to 8.3
4545
- Nette Utils 3.1 is compatible with PHP 7.1 to 8.0
4646
- Nette Utils 3.0 is compatible with PHP 7.1 to 8.0
4747
- Nette Utils 2.5 is compatible with PHP 5.6 to 8.0

src/Utils/Reflection.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,8 @@ private static function parseUseStatements(string $code, ?string $forClass = nul
221221
$tokens = [];
222222
}
223223

224-
$namespace = $class = $classLevel = $level = null;
224+
$namespace = $class = null;
225+
$classLevel = $level = 0;
225226
$res = $uses = [];
226227

227228
$nameTokens = [T_STRING, T_NS_SEPARATOR, T_NAME_QUALIFIED, T_NAME_FULLY_QUALIFIED];
@@ -290,7 +291,7 @@ private static function parseUseStatements(string $code, ?string $forClass = nul
290291

291292
case ord('}'):
292293
if ($level === $classLevel) {
293-
$class = $classLevel = null;
294+
$class = $classLevel = 0;
294295
}
295296

296297
$level--;

0 commit comments

Comments
 (0)