forked from shopware/shopware
-
Notifications
You must be signed in to change notification settings - Fork 0
/
phpstan.neon.dist
74 lines (68 loc) · 3.42 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
parameters:
level: 5
treatPhpDocTypesAsCertain: false
tmpDir: %rootDir%/../../../../../../../var/cache/phpstan
autoload_files:
# the placeholder "%ShopwareAutoloadFile%" will be replaced on execution by dev-ops/analyze/phpstan-config-generator.php script
- %ShopwareAutoloadFile%
paths:
- src
- ../src
symfony:
constant_hassers: false
# the placeholder "%ShopwareHashedCacheDir%" will be replaced on execution by dev-ops/analyze/phpstan-config-generator.php script
container_xml_path: '%rootDir%/../../../../../../..%ShopwareHashedCacheDir%/srcShopware_Development_KernelDevDebugContainer.xml'
inferPrivatePropertyTypeFromConstructor: true
excludes_analyse:
- src/Core/Flag/feature_*.php
- src/Recovery/*
- src/Docs/Resources/*
- src/Storefront/Framework/Cache/CacheDecorator.php
- src/Docs/Resources/current/2-internals/1-core/50-checkout-process/_examples/10-cart-example.php
# Tests
- src/**/*Test.php
- src/Core/Framework/Test/**/*.php
- src/**/Test/**/_fixture/feature_*.php
- src/Core/TestBootstrap.php
ignoreErrors:
# https://github.com/phpstan/phpstan/issues/1060
- '#Call to an undefined method Symfony\\Component\\Config\\Definition\\Builder\\NodeParentInterface::(variableNode|scalarNode|end|integerNode|booleanNode|enumNode)\(\)\.#'
# PhpStan does not recognize the Faker plugins correctly. They are called via magic methods
- '#Access to an undefined property Faker\\Generator::\$[^.]+\.#'
# For BC with Symfony 4
- '#Method Symfony\\Contracts\\EventDispatcher\\EventDispatcherInterface::dispatch\(\) invoked with 2 parameters, 1 required\.#'
# To fix this error, the \Shopware\Core\Framework\Struct\Collection::createNew method has to be implemented
# in every implementation of `Collection` and needs to return `new self` instead of `new static`. See https://github.com/phpstan/phpstan/issues/2773
-
message: '#Unsafe usage of new static()#'
path: src/Core/Framework/Struct/Collection.php
# Exception for CopyBatch file system plugin. It is called via magic method
- '#Call to an undefined method League\\Flysystem\\FilesystemInterface::copyBatch\(\)\.#'
-
message: '#Access to private property#'
path: src/Core/Framework/Api/Controller/CacheController.php
# Invalid phpdoc in OpenAPI Library
-
message: '#Strict comparison using#'
path: src/Core/Framework/Api/ApiDefinition/Generator/OpenApi/OpenApiLoader.php
services:
-
class: Shopware\Development\Analyze\PHPStan\Rules\Decoratable\DecoratableImplementsInterfaceRule
tags:
- phpstan.rules.rule
-
class: Shopware\Development\Analyze\PHPStan\Rules\Decoratable\DecoratableDoesNotAddPublicMethodRule
tags:
- phpstan.rules.rule
-
class: Shopware\Development\Analyze\PHPStan\Rules\Decoratable\DecoratableDoesNotCallOwnPublicMethodRule
tags:
- phpstan.rules.rule
-
class: Shopware\Development\Analyze\PHPStan\Rules\Decoratable\DecoratableNotDirectlyDependetRule
tags:
- phpstan.rules.rule
-
class: Shopware\Development\Analyze\PHPStan\Rules\Decoratable\DecoratableNotInstantiatedRule
tags:
- phpstan.rules.rule