diff --git a/CHANGELOG.md b/CHANGELOG.md index 3cd4ad9..fcbf147 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,8 @@ * (improvement) Add `-v` flag to PHPStan call to also show the error identifiers. * (improvement) Add editor URL to PHPStan config. +* (improvement) Disable certain PHPStan checks for tests. +* (improvement) Disable `missingType.iterableValue` PHPStan check globally. 1.3.2 diff --git a/phpstan/lib.neon b/phpstan/lib.neon index 732575c..829b4fa 100644 --- a/phpstan/lib.neon +++ b/phpstan/lib.neon @@ -1,24 +1,36 @@ parameters: - level: 9 + level: 9 - editorUrl: 'phpstorm://open?file=%%file%%&line=%%line%%' + editorUrl: 'phpstorm://open?file=%%file%%&line=%%line%%' - checkAlwaysTrueCheckTypeFunctionCall: true - checkAlwaysTrueInstanceof: true - checkAlwaysTrueStrictComparison: true - checkDynamicProperties: true - checkExplicitMixedMissingReturn: true - checkUninitializedProperties: true - inferPrivatePropertyTypeFromConstructor: true - polluteScopeWithLoopInitialAssignments: false - reportPossiblyNonexistentConstantArrayOffset: true - reportUnmatchedIgnoredErrors: false - treatPhpDocTypesAsCertain: false + checkAlwaysTrueCheckTypeFunctionCall: true + checkAlwaysTrueInstanceof: true + checkAlwaysTrueStrictComparison: true + checkDynamicProperties: true + checkExplicitMixedMissingReturn: true + checkUninitializedProperties: true + inferPrivatePropertyTypeFromConstructor: true + polluteScopeWithLoopInitialAssignments: false + reportPossiblyNonexistentConstantArrayOffset: true + reportUnmatchedIgnoredErrors: false + treatPhpDocTypesAsCertain: false - excludePaths: - analyse: - - %currentWorkingDirectory%/vendor - analyseAndScan: - - %currentWorkingDirectory%/node_modules - - %currentWorkingDirectory%/var - - %currentWorkingDirectory%/vendor-bin + excludePaths: + analyse: + - %currentWorkingDirectory%/vendor + analyseAndScan: + - %currentWorkingDirectory%/node_modules + - %currentWorkingDirectory%/var + - %currentWorkingDirectory%/vendor-bin + + ignoreErrors: + - identifier: missingType.iterableValue + - + identifier: argument.type + path: %currentWorkingDirectory%/tests/* + - + identifier: staticMethod.alreadyNarrowedType + path: %currentWorkingDirectory%/tests/* + - + identifier: method.deprecated + path: %currentWorkingDirectory%/tests/* diff --git a/phpstan/symfony.neon b/phpstan/symfony.neon index 73a8327..0f80968 100644 --- a/phpstan/symfony.neon +++ b/phpstan/symfony.neon @@ -1,6 +1,6 @@ includes: - - lib.neon + - lib.neon parameters: - symfony: - container_xml_path: %currentWorkingDirectory%/var/cache/dev/App_KernelDevDebugContainer.xml + symfony: + container_xml_path: %currentWorkingDirectory%/var/cache/dev/App_KernelDevDebugContainer.xml