-
Notifications
You must be signed in to change notification settings - Fork 27
/
phpstan.neon.dist
80 lines (73 loc) · 4.24 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
includes:
- phpstan-baseline.neon
- %ShopwareRoot%/src/Core/DevOps/StaticAnalyze/PHPStan/common.neon
parameters:
tmpDir: var/cache/phpstan
paths:
- src
- tests
excludePaths:
- src/Resources
- tests/Jest
- tests/acceptance
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
- # Ignore hash functions rule for the following files because we use it in another context
message: '#Do not use .* function, use class Shopware\\Core\\Framework\\Util\\Hasher instead#'
paths:
- src/Migration/Media/Processor/HttpDownloadServiceBase.php
- src/Migration/Service/MigrationDataConverter.php
- src/Profile/Shopware/Converter/OrderConverter.php
- src/Profile/Shopware/Converter/ProductConverter.php
- src/Profile/Shopware/Converter/ProductOptionRelationConverter.php
- src/Profile/Shopware/Converter/ProductPropertyRelationConverter.php
- src/Profile/Shopware/Converter/PropertyGroupOptionConverter.php
- src/Profile/Shopware/Converter/ShippingMethodConverter.php
- src/Profile/Shopware/Media/Strategy/Md5StrategyResolver.php
- src/Migration/Converter/Converter.php
- # To fix those issues, the AbstractProvider needs a generic type, which could then be used further down in the methods as typehints for other generic typed parameters
message: '#(readTotalFromRepo|readTableFromRepo|cleanupSearchResult)\(\) has parameter .* with generic class#'
path: src/DataProvider/Provider/Data/AbstractProvider.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/Shopware/Premapping/OrderDeliveryStateReader.php
- src/Profile/Shopware/Premapping/OrderStateReader.php
- src/Profile/Shopware/Premapping/TransactionStateReader.php
- message: """
#^Call to deprecated method getData\\(\\) of class Shopware\\\\Core\\\\Framework\\\\DataAbstractionLayer\\\\Indexing\\\\EntityIndexingMessage\\:
tag\\:v6\\.7\\.0 \\- reason\\:return\\-type\\-change \\- Will return native type$#
"""
paths:
- src/Migration/MessageQueue/OrderCountIndexer.php
- message: """
#^Fetching class constant class of deprecated class Shopware\\\\Core\\\\Checkout\\\\Payment\\\\Cart\\\\PaymentHandler\\\\CashPayment:
tag:v6.7.0 - reason:becomes-internal$#
"""
paths:
- src/Profile/Shopware/Premapping/PaymentMethodReader.php
- tests/Profile/Shopware/Premapping/PaymentMethodReaderTest.php
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