-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathphpstan.neon
72 lines (61 loc) · 2.16 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
# default phpstan configuration
#
# Adding a baseline
# - baseline: this ignores some errors
# - the goal is to fix all problems that can be fixed and remove the error messages from this file
# create:
# 1. Increase level in phpstan.neon
# 2. php .Build/bin/phpstan analyze --configuration phpstan.neon --generate-baseline
# 3. Include baseline file in phpstan.neon
#
# Dealing with mixed arrays
# Be as specific as possible, e.g. use
#
# * `array<string>` etc.
# * or `array{'foo': int, "bar": string}`
#
# If the array is dynamic or cannot be specified, use `mixed[]`
# see
#
# * https://phpstan.org/writing-php-code/phpdoc-types#array-shapes
# * https://phpstan.org/blog/solving-phpstan-no-value-type-specified-in-iterable-type
# * https://github.com/phpstan/phpstan/discussions/4375
# ----------------------
# basic configuration
# assumes phpstan run via runTests.sh - with working directory in .Build
includes:
- phpstan-baseline.neon
# If phpstan/extension-installer is used, this is not necessary.
#- vendor/jangregor/phpstan-prophecy/extension.neon
parameters:
bootstrapFiles:
- phpstan.bootstrap.php
tmpDir: .Build/var/cache/phpstan
parallel:
# Don't be overly greedy on machines with more CPU's to be a good neighbor especially on CI
maximumNumberOfProcesses: 5
level: 6
# check these paths
paths:
- Classes
#- Tests
# use these paths (but do not check)
scanDirectories:
- .Build/Web/typo3/sysext
# do not check if array types specified
checkMissingIterableValueType: false
excludes_analyse:
#- ext_emconf.php
# add link for PhpStorm
editorUrl: 'phpstorm://open?file=%%file%%&line=%%line%%'
# do not report errors which are defined in ignoreErrors, but are not found in code
reportUnmatchedIgnoredErrors: false
ignoreErrors:
# https://phpstan.org/user-guide/ignoring-errors
- '#Call to deprecated method fetch.*\(\) of class Doctrine\\DBAL\\Driver\\ResultStatement:#'
#- '#Cannot call method fetch.*\(\) on Doctrine\\DBAL\\Driver\\ResultStatement\|int.#'
#-
# message: '#Right side of \\|\\| is always false.#'
# paths:
# - **/ext_localconf.php
# - **/ext_tables.php