diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 0cf0e238c..5dd7d837d 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -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 diff --git a/composer.json b/composer.json index ec4efb0e4..7e881052c 100644 --- a/composer.json +++ b/composer.json @@ -15,7 +15,7 @@ } ], "require": { - "php": ">=7.2 <8.3" + "php": ">=7.2 <8.4" }, "require-dev": { "nette/tester": "~2.0", diff --git a/readme.md b/readme.md index 430cc7359..5317b8e65 100644 --- a/readme.md +++ b/readme.md @@ -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 diff --git a/src/Utils/Reflection.php b/src/Utils/Reflection.php index 275775830..1ee207a4c 100644 --- a/src/Utils/Reflection.php +++ b/src/Utils/Reflection.php @@ -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 @@ -387,7 +388,7 @@ private static function parseUseStatements(string $code, ?string $forClass = nul case '}': if ($level === $classLevel) { - $class = $classLevel = null; + $class = $classLevel = 0; } $level--;