From ecb2d31df0adff5f8805fc5afea5b22bcf81ae91 Mon Sep 17 00:00:00 2001 From: Matias Griese Date: Thu, 2 Dec 2021 13:52:51 +0200 Subject: [PATCH] PHP 8.1 --- composer.json | 4 ++-- system/src/Grav/Framework/Acl/Action.php | 1 + tests/phpstan/phpstan.neon | 11 +++++++++++ tests/phpstan/plugins.neon | 11 +++++++++++ 4 files changed, 25 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 81c357c1f..c1c4db6fd 100644 --- a/composer.json +++ b/composer.json @@ -64,8 +64,8 @@ }, "require-dev": { "codeception/codeception": "^4.1", - "phpstan/phpstan": "^1.0", - "phpstan/phpstan-deprecation-rules": "^1.0", + "phpstan/phpstan": "^1.2", + "phpstan/phpstan-deprecation-rules": "^1.2", "phpunit/php-code-coverage": "~9.2", "getgrav/markdowndocs": "^2.0", "codeception/module-asserts": "^1.3", diff --git a/system/src/Grav/Framework/Acl/Action.php b/system/src/Grav/Framework/Acl/Action.php index 1f883a054..f5a6f6b4d 100644 --- a/system/src/Grav/Framework/Acl/Action.php +++ b/system/src/Grav/Framework/Acl/Action.php @@ -190,6 +190,7 @@ class Action implements IteratorAggregate, Countable /** * @return array */ + #[\ReturnTypeWillChange] public function __debugInfo() { return [ diff --git a/tests/phpstan/phpstan.neon b/tests/phpstan/phpstan.neon index 798010336..f40fec413 100644 --- a/tests/phpstan/phpstan.neon +++ b/tests/phpstan/phpstan.neon @@ -11,6 +11,17 @@ parameters: excludePaths: - */system/src/Grav/Common/Errors/Resources/layout.html.php - */system/src/Twig/DeferredExtension/DeferredNodeVisitor.php + # Ignore vendor dev dependencies and tests + - */vendor/*/*/tests + - */vendor/behat + - */vendor/codeception + - */vendor/phpstan + - */vendor/phpunit + - */vendor/phpspec + - */vendor/phpdocumentor + - */vendor/sebastian + - */vendor/theseer + - */vendor/webmozart inferPrivatePropertyTypeFromConstructor: true reportUnmatchedIgnoredErrors: false diff --git a/tests/phpstan/plugins.neon b/tests/phpstan/plugins.neon index 7c0e8cb26..6cf9e93c8 100644 --- a/tests/phpstan/plugins.neon +++ b/tests/phpstan/plugins.neon @@ -9,6 +9,17 @@ parameters: - %currentWorkingDirectory%/user/plugins/*/tests/* - %currentWorkingDirectory%/user/plugins/gantry5/src/platforms - %currentWorkingDirectory%/user/plugins/gantry5/src/classes/Gantry/Framework/Services/ErrorServiceProvider.php + # Ignore vendor dev dependencies and tests + - */vendor/*/*/tests + - */vendor/behat + - */vendor/codeception + - */vendor/phpstan + - */vendor/phpunit + - */vendor/phpspec + - */vendor/phpdocumentor + - */vendor/sebastian + - */vendor/theseer + - */vendor/webmozart bootstrapFiles: - plugins-bootstrap.php inferPrivatePropertyTypeFromConstructor: true