Skip to content

Commit

Permalink
support for PHP 8.3
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed Jul 30, 2023
1 parent 28547a3 commit 9124157
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
php: ['8.0', '8.1', '8.2']
php: ['8.0', '8.1', '8.2', '8.3']

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"
},
"require-dev": {
"nette/tester": "^2.5",
Expand Down
4 changes: 2 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ The recommended way to install is via Composer:
composer require nette/utils
```

- Nette Utils 4.0 is compatible with PHP 8.0 to 8.2
- Nette Utils 3.2 is compatible with PHP 7.2 to 8.2
- Nette Utils 4.0 is compatible with PHP 8.0 to 8.3
- Nette Utils 3.2 is compatible with PHP 7.2 to 8.3
- Nette Utils 3.1 is compatible with PHP 7.1 to 8.0
- Nette Utils 3.0 is compatible with PHP 7.1 to 8.0
- Nette Utils 2.5 is compatible with PHP 5.6 to 8.0
Expand Down
5 changes: 3 additions & 2 deletions src/Utils/Reflection.php
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,8 @@ private static function parseUseStatements(string $code, ?string $forClass = nul
$tokens = [];
}

$namespace = $class = $classLevel = $level = null;
$namespace = $class = null;
$classLevel = $level = 0;
$res = $uses = [];

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

case ord('}'):
if ($level === $classLevel) {
$class = $classLevel = null;
$class = $classLevel = 0;
}

$level--;
Expand Down

0 comments on commit 9124157

Please sign in to comment.