-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathphpstan.neon.dist
63 lines (56 loc) · 2.92 KB
/
phpstan.neon.dist
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
includes:
- phpstan-baseline.neon
- %ShopwareRoot%/src/Core/DevOps/StaticAnalyze/PHPStan/common.neon
parameters:
tmpDir: var/cache/phpstan
paths:
- src
- tests
excludePaths:
- src/Resources
scanDirectories:
- ../SwagMigrationAssistant/src
- ../SwagMigrationAssistant/tests
symfony:
constant_hassers: false
# the placeholder "%ShopwareHashedCacheDir%" will be replaced on execution by bin/phpstan-config-generator.php script
container_xml_path: '../../..%ShopwareHashedCacheDir%/%ShopwareKernelClass%DevDebugContainer.xml'
consoleApplicationLoader: %ShopwareRoot%/src/Core/DevOps/StaticAnalyze/console-application.php
type_perfect:
narrow_return: true
narrow_param: true
ignoreErrors:
- message: '#Service ".*" is private#'
paths:
- tests/**/*Test.php
- # ToDo remove when bumping min shopware version
message: "#^Do not use .* function, use class .* instead\\.$#"
paths:
- src/**/*.php
# ToDo: fix platform deprecations for v6.7.0.0
- message: """
#^Call to deprecated method getName\\(\\) of class Shopware\\\\Core\\\\System\\\\StateMachine\\\\Aggregation\\\\StateMachineState\\\\StateMachineStateEntity\\:
tag\\:v6\\.7\\.0 \\- reason\\:return\\-type\\-change \\- Will also return null
return type will be \\?string in v6\\.7\\.0\\.0$#
"""
paths:
- src/Profile/Magento/Premapping/OrderDeliveryStateReader.php
- src/Profile/Magento/Premapping/OrderStateReader.php
- message: """
#^Fetching class constant class of deprecated class Shopware\\\\Core\\\\Checkout\\\\Payment\\\\Cart\\\\PaymentHandler\\\\CashPayment:
tag:v6.7.0 - reason:becomes-internal$#
"""
paths:
- tests/Profile/Magento/Premapping/PaymentMethodReaderTest.php
- # Ignore undefined function calls on MappingServiceInterface because PHPStan dont get the inheritance
message: '#Call to an undefined method SwagMigrationAssistant\\Migration\\Mapping\\MappingServiceInterface::createListItemMapping|getUuidList\(\)#'
rules:
# Shopware core rules
- Shopware\Core\DevOps\StaticAnalyze\PHPStan\Rules\Deprecation\DeprecatedMethodsThrowDeprecationRule
- Shopware\Core\DevOps\StaticAnalyze\PHPStan\Rules\Tests\CoversAttributeRule
- Shopware\Core\DevOps\StaticAnalyze\PHPStan\Rules\Tests\MockingSimpleObjectsNotAllowedRule
- Shopware\Core\DevOps\StaticAnalyze\PHPStan\Rules\FinalClassRule
- Shopware\Core\DevOps\StaticAnalyze\PHPStan\Rules\DecorationPatternRule
- Shopware\Core\DevOps\StaticAnalyze\PHPStan\Rules\PackageAnnotationRule
- Shopware\Core\DevOps\StaticAnalyze\PHPStan\Rules\DomainExceptionRule
- Shopware\Core\DevOps\StaticAnalyze\PHPStan\Rules\NoAfterStatementRule