Exclude new PHPStan level 6 for now
[MAILPOET-2588]
This commit is contained in:
@@ -475,7 +475,6 @@ class RoboFile extends \Robo\Tasks {
|
|||||||
'WP_ROOT="' . getenv('WP_ROOT') . '"',
|
'WP_ROOT="' . getenv('WP_ROOT') . '"',
|
||||||
'php -d memory_limit=2G',
|
'php -d memory_limit=2G',
|
||||||
"$dir/tasks/phpstan/vendor/bin/phpstan analyse ",
|
"$dir/tasks/phpstan/vendor/bin/phpstan analyse ",
|
||||||
'--level 7',
|
|
||||||
]);
|
]);
|
||||||
|
|
||||||
// PHPStan must be run out of main plugin directory to avoid its autoloading
|
// PHPStan must be run out of main plugin directory to avoid its autoloading
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
parameters:
|
parameters:
|
||||||
|
level: 8
|
||||||
tmpDir: ../../temp/phpstan
|
tmpDir: ../../temp/phpstan
|
||||||
bootstrap: bootstrap.php
|
bootstrap: bootstrap.php
|
||||||
autoload_files:
|
autoload_files:
|
||||||
@@ -15,9 +16,16 @@ parameters:
|
|||||||
- WP_DEBUG
|
- WP_DEBUG
|
||||||
ignoreErrors:
|
ignoreErrors:
|
||||||
- '/Parameter #1 $cssOrXPath of method AcceptanceTester::moveMouseOver() expects string|null, array<string, string> given./'
|
- '/Parameter #1 $cssOrXPath of method AcceptanceTester::moveMouseOver() expects string|null, array<string, string> given./'
|
||||||
|
- '/(with|has) no (return )?typehint specified/' # exclude level 6 errors
|
||||||
excludes_analyse:
|
excludes_analyse:
|
||||||
- ../../tests/_support/_generated
|
- ../../tests/_support/_generated
|
||||||
|
|
||||||
|
# exclude level 6 errors
|
||||||
|
checkGenericClassInNonGenericObjectType: false
|
||||||
|
checkMissingIterableValueType: false
|
||||||
|
checkMissingVarTagTypehint: false
|
||||||
|
checkMissingTypehints: false
|
||||||
|
|
||||||
includes:
|
includes:
|
||||||
- vendor/phpstan/phpstan-phpunit/extension.neon
|
- vendor/phpstan/phpstan-phpunit/extension.neon
|
||||||
- extensions/PHPUnit5CompatExtension/extension.neon
|
- extensions/PHPUnit5CompatExtension/extension.neon
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
parameters:
|
parameters:
|
||||||
|
level: 8
|
||||||
tmpDir: ../../temp/phpstan
|
tmpDir: ../../temp/phpstan
|
||||||
bootstrap: bootstrap.php
|
bootstrap: bootstrap.php
|
||||||
inferPrivatePropertyTypeFromConstructor: true
|
inferPrivatePropertyTypeFromConstructor: true
|
||||||
@@ -13,9 +14,16 @@ parameters:
|
|||||||
- '#Parameter \#2 \$prefix of function http_build_query expects string, null given.#'
|
- '#Parameter \#2 \$prefix of function http_build_query expects string, null given.#'
|
||||||
- '#Parameter \#1 \$function of function call_user_func_array expects callable(): mixed, .wc_.*. given.#'
|
- '#Parameter \#1 \$function of function call_user_func_array expects callable(): mixed, .wc_.*. given.#'
|
||||||
- '#Parameter \#1 \$reader of class MailPoetVendor\\Doctrine\\ORM\\Mapping\\Driver\\AnnotationDriver constructor expects MailPoetVendor\\Doctrine\\Common\\Annotations\\AnnotationReader, MailPoetVendor\\Doctrine\\Common\\Annotations\\CachedReader given#'
|
- '#Parameter \#1 \$reader of class MailPoetVendor\\Doctrine\\ORM\\Mapping\\Driver\\AnnotationDriver constructor expects MailPoetVendor\\Doctrine\\Common\\Annotations\\AnnotationReader, MailPoetVendor\\Doctrine\\Common\\Annotations\\CachedReader given#'
|
||||||
|
- '/(with|has) no (return )?typehint specified/' # exclude level 6 errors
|
||||||
reportUnmatchedIgnoredErrors: false
|
reportUnmatchedIgnoredErrors: false
|
||||||
dynamicConstantNames:
|
dynamicConstantNames:
|
||||||
- WP_DEBUG
|
- WP_DEBUG
|
||||||
- MAILPOET_PREMIUM_INITIALIZED
|
- MAILPOET_PREMIUM_INITIALIZED
|
||||||
|
|
||||||
|
# exclude level 6 errors
|
||||||
|
checkGenericClassInNonGenericObjectType: false
|
||||||
|
checkMissingIterableValueType: false
|
||||||
|
checkMissingVarTagTypehint: false
|
||||||
|
checkMissingTypehints: false
|
||||||
includes:
|
includes:
|
||||||
- phpstan-baseline.neon # https://medium.com/@ondrejmirtes/phpstans-baseline-feature-lets-you-hold-new-code-to-a-higher-standard-e77d815a5dff
|
- phpstan-baseline.neon # https://medium.com/@ondrejmirtes/phpstans-baseline-feature-lets-you-hold-new-code-to-a-higher-standard-e77d815a5dff
|
||||||
|
Reference in New Issue
Block a user