Skip to content
Snippets Groups Projects
Commit 334210e2 authored by Alexander Schnitzler's avatar Alexander Schnitzler
Browse files

[TASK] Restructure phpstan configuration

This patch simply pulls out the level 2 rules into
a separate configuration file which is a copy of the
original level 2 configuration file of phpstan with
some rules, services and parameters disabled.

Also, additional configuration files are put into the
Build folder and phpstan.neon has been added to the
.gitattributes file.

Releases: master
Resolves: #90789
Change-Id: Ia3b3c30cfa57227c0607904df38add31f36be0e2
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/63802


Tested-by: default avatarTYPO3com <noreply@typo3.com>
Tested-by: default avatarGeorg Ringer <georg.ringer@gmail.com>
Tested-by: default avatarAlexander Schnitzler <git@alexanderschnitzler.de>
Reviewed-by: default avatarGeorg Ringer <georg.ringer@gmail.com>
Reviewed-by: default avatarAlexander Schnitzler <git@alexanderschnitzler.de>
parent 20976346
Branches
Tags
No related merge requests found
......@@ -5,6 +5,7 @@
/.travis.yml export-ignore
/Build/ export-ignore
/dynamicReturnTypeMeta.json export-ignore
/phpstan.neon export-ignore
/rector.yml export-ignore
/typo3/sysext/*/Resources/Private/TypeScript/ export-ignore
/typo3/sysext/*/Tests/ export-ignore
......
parameters:
checkClassCaseSensitivity: true
# checkThisOnly: false
# checkPhpDocMissingReturn: true
rules:
- PHPStan\Rules\Cast\EchoRule
- PHPStan\Rules\Cast\InvalidCastRule
- PHPStan\Rules\Cast\InvalidPartOfEncapsedStringRule
- PHPStan\Rules\Cast\PrintRule
- PHPStan\Rules\Functions\IncompatibleDefaultParameterTypeRule
- PHPStan\Rules\Generics\ClassAncestorsRule
- PHPStan\Rules\Generics\ClassTemplateTypeRule
- PHPStan\Rules\Generics\FunctionTemplateTypeRule
- PHPStan\Rules\Generics\FunctionSignatureVarianceRule
- PHPStan\Rules\Generics\InterfaceAncestorsRule
- PHPStan\Rules\Generics\InterfaceTemplateTypeRule
- PHPStan\Rules\Generics\MethodTemplateTypeRule
- PHPStan\Rules\Generics\MethodSignatureVarianceRule
- PHPStan\Rules\Generics\TraitTemplateTypeRule
- PHPStan\Rules\Methods\IncompatibleDefaultParameterTypeRule
- PHPStan\Rules\Operators\InvalidBinaryOperationRule
# - PHPStan\Rules\Operators\InvalidUnaryOperationRule
- PHPStan\Rules\Operators\InvalidComparisonOperationRule
- PHPStan\Rules\PhpDoc\IncompatiblePhpDocTypeRule
- PHPStan\Rules\PhpDoc\IncompatiblePropertyPhpDocTypeRule
- PHPStan\Rules\PhpDoc\InvalidPhpDocTagValueRule
- PHPStan\Rules\PhpDoc\InvalidPHPStanDocTagRule
- PHPStan\Rules\PhpDoc\InvalidThrowsPhpDocValueRule
- PHPStan\Rules\PhpDoc\WrongVariableNameInVarTagRule
services:
-
class: PHPStan\Rules\Functions\CallCallablesRule
arguments:
reportMaybes: %reportMaybes%
tags:
- phpstan.rules.rule
-
class: PHPStan\Rules\PhpDoc\InvalidPhpDocVarTagTypeRule
arguments:
checkClassCaseSensitivity: %checkClassCaseSensitivity%
checkMissingVarTagTypehint: %checkMissingVarTagTypehint%
tags:
- phpstan.rules.rule
File moved
includes:
- phpstan.typo3.neon
- Build/phpstan.typo3.neon
- Build/phpstan.level2.neon
# Include bleeding edge rules if necessary but do not commit
# - vendor/phpstan/phpstan/conf/bleedingEdge.neon
rules:
# those are level 2 rules, will be removed once level 2 is completely active
- PHPStan\Rules\PhpDoc\IncompatiblePhpDocTypeRule
- PHPStan\Rules\PhpDoc\IncompatiblePropertyPhpDocTypeRule
- PHPStan\Rules\PhpDoc\InvalidPhpDocTagValueRule
- PHPStan\Rules\PhpDoc\InvalidPHPStanDocTagRule
- PHPStan\Rules\PhpDoc\InvalidThrowsPhpDocValueRule
- PHPStan\Rules\PhpDoc\WrongVariableNameInVarTagRule
parameters:
level: 1
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment