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 07c0006 commit a4175c6
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 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: ['7.2', '7.3', '7.4', '8.0', '8.1', '8.2']
php: ['7.2', '7.3', '7.4', '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": ">=7.2 <8.3"
"php": ">=7.2 <8.4"
},
"require-dev": {
"nette/tester": "~2.0",
Expand Down
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ The recommended way to install is via Composer:
composer require nette/utils
```

- Nette Utils 3.2 is compatible with PHP 7.2 to 8.2
- 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 @@ -316,7 +316,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 = PHP_VERSION_ID < 80000
Expand Down Expand Up @@ -387,7 +388,7 @@ private static function parseUseStatements(string $code, ?string $forClass = nul

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

$level--;
Expand Down

0 comments on commit a4175c6

Please sign in to comment.