forked from contao/contao
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathphpstan.neon
76 lines (62 loc) · 3.45 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
includes:
- vendor-bin/phpstan/vendor/phpstan/phpstan/conf/bleedingEdge.neon
- vendor-bin/phpstan/vendor/phpstan/phpstan-phpunit/extension.neon
- vendor-bin/phpstan/vendor/phpstan/phpstan-phpunit/rules.neon
- vendor-bin/phpstan/vendor/phpstan/phpstan-symfony/extension.neon
- vendor-bin/phpstan/vendor/phpstan/phpstan-symfony/rules.neon
- vendor-bin/phpstan/vendor/slam/phpstan-extensions/conf/symfony-rules.neon
rules:
- TheCodingMachine\PHPStan\Rules\Exceptions\DoNotThrowExceptionBaseClassRule
- TheCodingMachine\PHPStan\Rules\Exceptions\ThrowMustBundlePreviousExceptionRule
parameters:
level: 6
featureToggles:
alwaysTrueAlwaysReported: false
detectDeadTypeInMultiCatch: false
disableCheckMissingIterableValueType: false
paths:
- %currentWorkingDirectory%/calendar-bundle/src
- %currentWorkingDirectory%/calendar-bundle/tests
- %currentWorkingDirectory%/comments-bundle/src
- %currentWorkingDirectory%/comments-bundle/tests
- %currentWorkingDirectory%/core-bundle/src
- %currentWorkingDirectory%/core-bundle/tests
- %currentWorkingDirectory%/faq-bundle/src
- %currentWorkingDirectory%/faq-bundle/tests
- %currentWorkingDirectory%/listing-bundle/src
- %currentWorkingDirectory%/maker-bundle/src
- %currentWorkingDirectory%/maker-bundle/tests
- %currentWorkingDirectory%/news-bundle/src
- %currentWorkingDirectory%/news-bundle/tests
- %currentWorkingDirectory%/newsletter-bundle/src
- %currentWorkingDirectory%/newsletter-bundle/tests
universalObjectCratesClasses:
- Contao\BackendUser
- Contao\Database\Result
- Contao\Model
- Contao\Template
excludePaths:
- %currentWorkingDirectory%/core-bundle/tests/Fixtures/*
- %currentWorkingDirectory%/core-bundle/tests/Functional/app/*
- %currentWorkingDirectory%/core-bundle/tests/Functional/var/*
ignoreErrors:
-
# Ignore the unexpected type hint required for the tagged_locator
message: '#type array<Symfony\\Component\\HttpKernel\\Fragment\\FragmentRendererInterface> is incompatible with native type Psr\\Container\\ContainerInterface#'
path: %currentWorkingDirectory%/core-bundle/src/Fragment/FragmentHandler.php
# Ignore the unused ModelMetadataTrait that will be removed in Contao 6
- '#Trait Contao\\CoreBundle\\File\\ModelMetadataTrait is used zero times and is not analysed\.#'
# Ignore the wrong return type hint of the UrlGeneratorInterface::generate() method
- '#Method Contao\\CoreBundle\\Picker\\AbstractPickerProvider::generateUrl\(\) never returns null so it can be removed from the return type\.#'
# Ignore the forward-compatible declaration that will be added in Symfony 7.0
- '#Method Symfony\\Component\\HttpKernel\\CacheWarmer\\WarmableInterface::warmUp\(\) invoked with 2 parameters, 1 required\.#'
treatPhpDocTypesAsCertain: false
checkMissingIterableValueType: false
rememberPossiblyImpureFunctionValues: false
services:
- class: Contao\Tools\PHPStan\HelperReturnTypeExtension
tags: [phpstan.broker.dynamicMethodReturnTypeExtension]
- class: Contao\Tools\PHPStan\ExtensionReturnTypeExtension
tags: [phpstan.broker.dynamicMethodReturnTypeExtension]
- class: Contao\Tools\PHPStan\GraphReturnTypeExtension
tags: [phpstan.broker.dynamicMethodReturnTypeExtension]