forked from shopware5/shopware
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.phpstan.neon
95 lines (90 loc) · 6.85 KB
/
.phpstan.neon
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
includes:
#- ../vendor/phpstan/phpstan-phpunit/rules.neon
#- ../vendor/phpstan/phpstan-phpunit/extension.neon
#- ../vendor/phpstan/phpstan-doctrine/extension.neon
parameters:
level: 5
autoload_directories:
- %currentWorkingDirectory%/var/cache
- %currentWorkingDirectory%/engine/Library
autoload_files:
- %currentWorkingDirectory%/vendor/autoload.php
paths:
- %currentWorkingDirectory%/engine/Shopware
excludes_analyse:
- %currentWorkingDirectory%/engine/Shopware/Plugins
- %currentWorkingDirectory%/engine/Shopware/Configs/Default.php
# Broken external interface definition
- %currentWorkingDirectory%/engine/Shopware/Bundle/SearchBundleES/CombinedConditionQueryBuilder.php
- %currentWorkingDirectory%/engine/Shopware/Components/Emotion/EmotionImporter.php # zip::locateName does not annotate correct return type
- %currentWorkingDirectory%/engine/Shopware/Components/Theme/Compiler.php # fwrite does not annotate correct return type
# Broken internal interface usage
- %currentWorkingDirectory%/engine/Shopware/Components/Log/Handler/FirePHPHandler.php
- %currentWorkingDirectory%/engine/Shopware/Components/DependencyInjection/Container.php
# Unsure how to fix
- %currentWorkingDirectory%/engine/Shopware/Models/Media/MediaSubscriber.php
- %currentWorkingDirectory%/engine/Shopware/Controllers/Backend/Property.php
- %currentWorkingDirectory%/engine/Shopware/Models/Document/Order.php
- %currentWorkingDirectory%/engine/Shopware/Components/Session/PdoSessionHandler.php
- %currentWorkingDirectory%/engine/Shopware/Components/DependencyInjection/LegacyPhpDumper.php
- %currentWorkingDirectory%/engine/Shopware/Components/ContainerAwareEventManager.php
- %currentWorkingDirectory%/engine/Shopware/Components/Install/Database.php
# The following are added because of the Hack in Document/Document
- %currentWorkingDirectory%/engine/Shopware/Models/Order/Document/Document.php
- %currentWorkingDirectory%/engine/Shopware/Components/Api/Resource/Order.php
- %currentWorkingDirectory%/engine/Shopware/Components/Document.php
- %currentWorkingDirectory%/engine/Shopware/Controllers/Api/Orders.php
- %currentWorkingDirectory%/engine/Shopware/Controllers/Backend/CanceledOrder.php
- %currentWorkingDirectory%/engine/Shopware/Controllers/Backend/Order.php
- %currentWorkingDirectory%/engine/Shopware/Models/Order/Detail.php
- %currentWorkingDirectory%/engine/Shopware/Models/Order/Order.php
- %currentWorkingDirectory%/engine/Shopware/Models/Order/OrderHistorySubscriber.php
- %currentWorkingDirectory%/engine/Shopware/Models/Order/Repository.php
- %currentWorkingDirectory%/engine/Shopware/Bundle/EsBackendBundle/Subscriber/OrmBacklogSubscriber.php
ignoreErrors:
- '#apcu_#'
- '#ioncube_#'
- '#opcache_#'
- '#imagettftext#'
- '#class Redis#'
- '#Call to an undefined method#'
- '#Access to an undefined property#'
- '#Method Symfony\\Component\\DependencyInjection\\LazyProxy\\PhpDumper\\DumperInterface\:\:getProxyFactoryCode\(\)#'
- '#Shopware_Components_Snippet_Manager::__construct\(\) does not call parent constructor from Enlight_Components_Snippet_Manager#'
- '#does not call parent constructor from Enlight_Class#'
- '#Binary operation "|=" between string and string results in an error.#'
- '#does not call parent constructor from Elasticsearch#'
- '#does not call parent constructor from Enlight_Controller_Action#'
- '#does not accept Doctrine\\ORM\\EntityRepository#'
# "getRepository"-Methods
- '#should return [a-zA-Z\\_]+Repository but returns Doctrine\\ORM\\EntityRepository#'
# Return values in Models
- '# returns Shopware\\Components\\Model\\ModelEntity.#'
- '#does not accept Shopware\\Components\\Api\\Resource\\Resource#'
- '# but returns Doctrine\\ORM\\QueryBuilder#'
# Model properties with wrong default values
- '#\([a-z]+\) does not accept default value of type [a-z]+\.#'
# Models that are detached by cloning and nulling the id
- '#\([a-z]+\) does not accept null\.#'
- '#supplied for foreach, only iterables are supported#'
# Interface / Implementation Switch
- '#expects Shopware\\Bundle\\SearchBundle\\Facet\\[a-zA-Z]+Facet, Shopware\\Bundle\\SearchBundle\\[a-zA-Z]+Interface given#'
- '#expects Shopware\\Bundle\\SearchBundle\\Condition\\[a-zA-Z]+Condition, Shopware\\Bundle\\SearchBundle\\[a-zA-Z]+Interface given#'
# Product/Shopcontext mixup
- '#expects Shopware\\Bundle\\StoreFrontBundle\\Struct\\ProductContextInterface, Shopware\\Bundle\\StoreFrontBundle\\Struct\\ShopContextInterface given#'
# Interfaces not being recognized
- '#expects Shopware\\Components\\Form\\Container\\[a-zA-Z]+, Shopware\\Components\\Form\\Interfaces\\Container given#'
- '#expects Doctrine\\ORM\\PersistentCollection, Doctrine\\Common\\Collections\\ArrayCollection&iterable<Shopware\\Models\\Shop\\TemplateConfig\\[a-zA-Z]+> given#'
- '#Parameter \#1 \$sort of method Doctrine\\ORM\\QueryBuilder::addOrderBy\(\) expects Doctrine\\ORM\\Query\\Expr\\OrderBy|string, array given#'
- '#Parameter \#3 \$type of method Doctrine\\ORM\\QueryBuilder::setParameter\(\) expects string\|null, int given#'
- '#Parameter \#3 \$type of method Doctrine\\DBAL\\Query\\QueryBuilder::setParameter\(\) expects string\|null, int given#'
- '#Parameter \#1 \$reader of class Doctrine\\ORM\\Mapping\\Driver\\AnnotationDriver constructor expects Doctrine\\Common\\Annotations\\AnnotationReader, Doctrine\\Common\\Annotations\\Reader given#'
- '#Parameter \#1 \$request of method Shopware\\Bundle\\SearchBundle\\CriteriaRequestHandlerInterface::handleRequest\(\) expects Enlight_Controller_Request_RequestHttp, Enlight_Controller_Request_Request given#'
# Container Issues
- '#Parameter \#2 \$service of method Symfony\\Component\\DependencyInjection\\ContainerInterface::set\(\) expects object, array<Shopware\\Bundle\\SearchBundleDBAL\\[a-zA-Z]+Interface> given#'
# Wrong type in ElasticsearchDSL, can be removed in 5.6
- '#Parameter \#2 \$value of class ONGR\\ElasticsearchDSL\\Query\\TermQuery constructor expects string#'
- '#Parameter \#2 \$value of class ONGR\\ElasticsearchDSL\\Query\\TermLevel\\TermQuery constructor expects string#'
- '#Parameter \#2 \$value of method ONGR\\ElasticsearchDSL\\Query\\Compound\\BoolQuery::addParameter\(\) expects array\|stdClass\|string#'
- '#Parameter \#2 \$value of method ONGR\\ElasticsearchDSL\\Aggregation\\AbstractAggregation::addParameter\(\) expects array\|stdClass\|string#'
reportUnmatchedIgnoredErrors: false