Phpstan fix for Deferred Twig extension compat mode

This commit is contained in:
Matias Griese 2021-09-24 12:26:05 +03:00
parent da00dd9eec
commit c220aa746a

View File

@ -1,4 +1,4 @@
#phpVersion: 70100 #phpVersion: 70300
includes: includes:
#- '../../vendor/phpstan/phpstan-strict-rules/rules.neon' #- '../../vendor/phpstan/phpstan-strict-rules/rules.neon'
- '../../vendor/phpstan/phpstan-deprecation-rules/rules.neon' - '../../vendor/phpstan/phpstan-deprecation-rules/rules.neon'
@ -10,8 +10,11 @@ parameters:
- phpstan-bootstrap.php - phpstan-bootstrap.php
excludes_analyse: excludes_analyse:
- */system/src/Grav/Common/Errors/Resources/layout.html.php - */system/src/Grav/Common/Errors/Resources/layout.html.php
- */system/src/Twig/DeferredExtension/DeferredNodeVisitor.php
inferPrivatePropertyTypeFromConstructor: true inferPrivatePropertyTypeFromConstructor: true
reportUnmatchedIgnoredErrors: false reportUnmatchedIgnoredErrors: false
treatPhpDocTypesAsCertain: false
# These checks are new in phpstan 0.12, ignore them for now. # These checks are new in phpstan 0.12, ignore them for now.
checkMissingIterableValueType: false checkMissingIterableValueType: false
@ -169,3 +172,8 @@ parameters:
- -
message: '#Variable \$this in PHPDoc tag @var does not exist#' message: '#Variable \$this in PHPDoc tag @var does not exist#'
path: '*/system/src/Grav/Installer/updates/*' path: '*/system/src/Grav/Installer/updates/*'
# Twig Deferred extension compatibility
-
message: '#typehint with deprecated interface#'
path: '*/system/src/Twig/DeferredExtension/DeferredNodeVisitorCompat.php'