-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathphpstan.neon
More file actions
51 lines (44 loc) · 2.28 KB
/
phpstan.neon
File metadata and controls
51 lines (44 loc) · 2.28 KB
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
includes:
# require phpstan/extension-installer to avoid including these lines PHPStan 1.x compat
#- vendor/ekino/phpstan-banned-code/extension.neon # https://github.com/ekino/phpstan-banned-code ✅
#- vendor/phpstan/phpstan-symfony/extension.neon # https://github.com/phpstan/phpstan-symfony ✅
#- vendor/phpstan/phpstan-deprecation-rules/rules.neon # https://github.com/phpstan/phpstan-deprecation-rules ✅
#- vendor/phpstan/phpstan-strict-rules/rules.neon # https://github.com/phpstan/phpstan-strict-rules ✅
#- vendor/phpstan/phpstan/phpstan-doctrine # https://github.com/phpstan/phpstan-doctrine ✅
parameters:
# https://phpstan.org/config-reference#rule-level
level: 5 # Max is level 9 as of PHPStan 1.0
# https://phpstan.org/config-reference#analysed-files
# Note that I have put my configuraiton file in the "./configuration" directory
# if you have yours at the root of your project remove the "../"
paths:
- config
- src
- tests
- public
# https://github.com/phpstan/phpstan-symfony#configuration
# Specific configuration for the Symfony plugin
symfony:
# I use the prod env because I have false positive regarding the tests which
# are executed in the test environment.
#container_xml_path: ../var/cache/prod/App_KernelProdDebugContainer.xml
container_xml_path: var/cache/dev/App_KernelDevDebugContainer.xml
# https://phpstan.org/config-reference#vague-typehints
checkMissingIterableValueType: true # https://phpstan.org/blog/solving-phpstan-no-value-type-specified-in-iterable-type
checkGenericClassInNonGenericObjectType: true # this parameter is activated at level 6
# Nothing ignored! (almost!) 🎉
ignoreErrors:
#- '#Dead catch - Error is never thrown in the try block.#'
#- '#Variable method call#'
#- '#to IntlDateFormatter constructor#' # @see Snippet197Trait
# I don't use the Symfony PHPUnit bridge in this project, but if you do, you
# probably will have to add the following bootstrap file:
#bootstrapFiles:
#- %rootDir%/../../../vendor/bin/.phpunit/phpunit/vendor/autoload.php
excludePaths:
- vendor
- tools
- var
- node_modules
- tests
- src/DataFixtures