Skip to content

Commit

Permalink
Merge pull request #40 from shopware/next-39412/update-phpstan
Browse files Browse the repository at this point in the history
NEXT-39412 - Use common PHPStan config from core
  • Loading branch information
mitelg authored Dec 2, 2024
2 parents 2499104 + 7ff86d0 commit 46dc1f4
Showing 1 changed file with 2 additions and 31 deletions.
33 changes: 2 additions & 31 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
@@ -1,16 +1,8 @@
includes:
- ../../../vendor/phpstan/phpstan/conf/bleedingEdge.neon
- ../../../src/Core/DevOps/StaticAnalyze/PHPStan/extension.neon
- ../../../src/Core/DevOps/StaticAnalyze/PHPStan/rules.neon
- ../../../src/Core/DevOps/StaticAnalyze/PHPStan/common.neon

parameters:
phpVersion: 80200
level: 8
tmpDir: ../../../var/cache/phpstan
treatPhpDocTypesAsCertain: false
checkFunctionNameCase: true
checkInternalClassCaseSensitivity: true
checkUninitializedProperties: true
tmpDir: var/cache/phpstan
paths:
- src
- tests
Expand All @@ -30,9 +22,6 @@ parameters:
- # Ignore namespace for test plugins
message: '#Class like namespace .* does not follow PSR-4 configuration in composer.json#'
path: tests/_fixtures
services:
- # register the class, so we can decorate it, but don't tag it as a rule, so only our decorator is used by PHPStan
class: Symplify\PHPStanRules\Rules\NoReturnSetterMethodRule

rules:
# Shopware core rules
Expand All @@ -44,21 +33,3 @@ rules:
- Shopware\Core\DevOps\StaticAnalyze\PHPStan\Rules\PackageAnnotationRule
- Shopware\Core\DevOps\StaticAnalyze\PHPStan\Rules\DomainExceptionRule
- Shopware\Core\DevOps\StaticAnalyze\PHPStan\Rules\NoAfterStatementRule

# rules from https://github.com/symplify/phpstan-rules
# domain
- Symplify\PHPStanRules\Rules\Enum\RequireUniqueEnumConstantRule
- Symplify\PHPStanRules\Rules\PreventParentMethodVisibilityOverrideRule

# explicit naming
- Symplify\PHPStanRules\Rules\ForbiddenMultipleClassLikeInOneFileRule

- Symplify\PHPStanRules\Rules\Complexity\ForbiddenArrayMethodCallRule

# complexity rules
- Symplify\PHPStanRules\Rules\NoDynamicNameRule

# naming rules
- Shopware\Core\DevOps\StaticAnalyze\PHPStan\Rules\Symplify\NoReturnSetterMethodWithFluentSettersRule
- Symplify\PHPStanRules\Rules\UppercaseConstantRule
- Symplify\PHPStanRules\Rules\CheckClassNamespaceFollowPsr4Rule

0 comments on commit 46dc1f4

Please sign in to comment.