forked from bolt/core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
phpstan.neon
52 lines (43 loc) · 2.27 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
parameters:
level: 5
paths:
- src
scanDirectories:
# In order to 'recognize' Twig and Carbon functions in global scope
- %currentWorkingDirectory%/vendor/twig/twig/src/Extension
- %currentWorkingDirectory%/vendor/nesbot/carbon/src/Carbon
ignoreErrors:
# false positive: `Unreachable statement - code above always terminates.`
# Note: https://github.com/phpstan/phpstan/issues/2651 is marked as fixed, but the issue remains.
-
message: '#Unreachable statement - code above always terminates#'
path: %currentWorkingDirectory%/src/*
# false positive: `TranslationInterface does not know about FieldTranslation::getValue().` Skip this error.
-
message: '#Call to an undefined method Knp\\DoctrineBehaviors\\Contract\\Entity\\TranslationInterface#'
path: %currentWorkingDirectory%/src/*
# false positive: Parameters in Storage\Directive\OrderDirective::orderByNumericField() aren't seen as integers
-
message: '#of method Doctrine\\ORM\\Query\\Expr::substring\(\) expects int#'
path: %currentWorkingDirectory%/src/Storage/FieldQueryUtils.php
# Call to undefined __get()
-
message: '#Call to an undefined method Sirius\\Upload\\Result\\ResultInterface|Symfony\\Component\\HttpFoundation\\File\\File::__get\(\)#'
path: %currentWorkingDirectory%/src/Controller/Backend/Async/UploadController.php
# false positive: An item to the Logger's Record added by us isn't recognized
-
message: "#Offset '.*' ([a-z ]*)on array#"
path: %currentWorkingDirectory%/src/Log/LogHandler.php
includes:
- vendor/phpstan/phpstan-symfony/extension.neon
- vendor/phpstan/phpstan-doctrine/extension.neon
# - vendor/thecodingmachine/phpstan-safe-rule/phpstan-safe-rule.neon # make ON when thecodingmachine/safe will get stable
# Todo: add these: https://tomasvotruba.com/blog/2020/12/14/new-in-symplify-9-more-than-110-phpstan-rules/
# services:
# -
# class: Symplify\CodingStandard\Rules\ForbiddenFuncCallRule
# tags: [phpstan.rules.rule]
# arguments:
# forbiddenFunctions: ['d', 'dd', 'dump', 'var_dump', 'extract']
#
# - Symplify\PackageBuilder\Matcher\ArrayStringAndFnMatcher