diff --git a/.github/workflows/php-package-ci.yml b/.github/workflows/php-package-ci.yml index b4b66b7..96f92f0 100644 --- a/.github/workflows/php-package-ci.yml +++ b/.github/workflows/php-package-ci.yml @@ -9,7 +9,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - php: [ 7.0, 7.1 ] + php: [ 7.4, 8.0 ] steps: - uses: actions/checkout@v2 - uses: shivammathur/setup-php@v2 @@ -18,7 +18,6 @@ jobs: - run: make composer - - if: matrix.php == '7.1' - run: make phpstan + - run: make phpstan - run: make run-tests diff --git a/Makefile b/Makefile index 1dd7a7a..42182e2 100644 --- a/Makefile +++ b/Makefile @@ -6,4 +6,4 @@ phpstan: vendor/bin/phpstan analyse -l 5 -c phpstan.neon src/ run-tests: - vendor/bin/tester tests + vendor/bin/tester tests -d extension=tokenizer.so diff --git a/composer.json b/composer.json index cb627b5..88cf8ff 100644 --- a/composer.json +++ b/composer.json @@ -21,13 +21,13 @@ } ], "require": { - "php": "~7.0", - "nette/application": ">= 2.2.10 < 2.3.0" + "php": "~7.4 | ~8.0", + "nette/application": "^2.4" }, "require-dev": { - "phpstan/phpstan": "~0.6.0", - "nette/tester": "~1.7.0", - "mockery/mockery": "~0.9.0" + "phpstan/phpstan": "^1.0", + "nette/tester": "^2.0", + "mockery/mockery": "^1.0" }, "autoload": { "psr-4": { diff --git a/phpstan.neon b/phpstan.neon index 1af7d4b..65c46ea 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -1,10 +1,6 @@ parameters: ignoreErrors: - - '#Call to an undefined method [a-zA-Z0-9\\_]+::renderAsync\(\)#' - - '#Call to an undefined method [a-zA-Z0-9\\_]+::render\(\)#' fileExtensions: - phpt - autoload_directories: -# - %rootDir%/../../../test - + treatPhpDocTypesAsCertain: false diff --git a/src/UI/AsyncControlTrait.php b/src/UI/AsyncControlTrait.php index 3c6c4f0..af66002 100644 --- a/src/UI/AsyncControlTrait.php +++ b/src/UI/AsyncControlTrait.php @@ -8,7 +8,7 @@ /** - * @method render + * @method render() */ trait AsyncControlTrait { @@ -31,9 +31,6 @@ public function handleAsyncLoad() } catch (\Throwable $e) { ob_end_clean(); throw $e; - } catch (\Exception $e) { - ob_end_clean(); - throw $e; } $content = ob_get_clean(); $presenter->getPayload()->snippets[$this->getSnippetId('async')] = $content;