generated from spawnia/php-package-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathphpstan.neon
More file actions
53 lines (46 loc) · 2.02 KB
/
phpstan.neon
File metadata and controls
53 lines (46 loc) · 2.02 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
52
includes:
- phpstan/include-by-php-version.php
- extension.neon
# rules.neon is conditionally included by include-by-php-version.php (PHP 8.0+ only)
rules:
#- MLL\Utils\PHPStan\Rules\ThrowableClassNameRule
- MLL\Utils\PHPStan\Rules\VariableNameIdToIDRule
- MLL\Utils\PHPStan\Rules\MissingClosureParameterTypehintRule
parameters:
level: max
paths:
- src
- tests
tmpDir: .build/phpstan
# Install https://plugins.jetbrains.com/plugin/7677-awesome-console to make those links clickable
editorUrl: '%%relFile%%:%%line%%'
# As long as we support multiple PHP versions, there will be some dead spots
reportUnmatchedIgnoredErrors: false
ignoreErrors:
# This is a library, so it should be extendable
- '#Unsafe usage of new static.*#'
# Not in older PHPUnit versions
- '#Attribute class PHPUnit\\Framework\\Attributes\\DataProvider does not exist\.#'
# Allows assert() calls to assist IDE autocompletion
- message: '#Call to function assert\(\) with true.* will always evaluate to true\.#'
# Optional parts of the library use enums
- message: '#Enumerations are only allowed since PHP 8\.1\.#'
paths:
- tests/Enum
# Test fixtures intentionally contain ID capitalization violations
- message: '#should use "ID" instead of "Id"#'
paths:
- tests/PHPStan/data/
# PHPStan internal API usage is acceptable in tests
- message: '#is not covered by backward compatibility promise#'
paths:
- tests/PHPStan/
# TODO remove when minimum PHPStan is bumped to ^2
# PropertyProperty is the primary class in php-parser v4 (PHPStan 1.x) - no warning
# PropertyProperty is an alias to PropertyItem in php-parser v5 (PHPStan 2.x) - triggers these warnings
- message: '#Class PhpParser\\Node\\Stmt\\PropertyProperty not found\. It has been renamed to PhpParser\\Node\\PropertyItem#'
paths:
- src/PHPStan/Rules/PropertyNameIdToIDRule.php
- message: '#Fetching class constant class of deprecated class PhpParser\\Node\\Stmt\\PropertyProperty#'
paths:
- src/PHPStan/Rules/PropertyNameIdToIDRule.php