-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathphpstan.neon
More file actions
65 lines (59 loc) · 2.38 KB
/
Copy pathphpstan.neon
File metadata and controls
65 lines (59 loc) · 2.38 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
53
54
55
56
57
58
59
60
61
62
63
64
65
includes:
- vendor/phpstan/phpstan-strict-rules/rules.neon
- vendor/phpstan/phpstan-deprecation-rules/rules.neon
- vendor/phpstan/phpstan-phpunit/extension.neon
- vendor/phpstan/phpstan-phpunit/rules.neon
- vendor/phpstan/phpstan-symfony/extension.neon
- vendor/phpstan/phpstan-symfony/rules.neon
- phpstan/exception-contract.neon
parameters:
level: max
paths:
- src
- tests
- phpstan/Rule
reportIgnoresWithoutComments: true
ignoreErrors:
# PHPUnit declares assertions as static methods on `Assert`, but the
# pervasive idiom is `$this->assertX()`. phpstan-phpunit handles type
# narrowing for these but doesn't override strict-rules' judgment that
# this is a dynamic call to a static method.
-
identifier: staticMethod.dynamicCall
path: tests/*
# Test fixture/helper PHPDoc completeness — out of scope for the static
# analysis hardening; can be tightened as a follow-up.
-
identifier: missingType.generics
path: tests/*
-
identifier: missingType.iterableValue
path: tests/*
-
identifier: missingType.return
path: tests/*
# Symfony's Processor returns an untyped array; phpstan-symfony narrows
# many other Symfony APIs but does not type processConfiguration's result
# from a Configuration definition. The tests probe specific keys precisely
# *because* the production code does.
-
identifier: argument.type
path: tests/DependencyInjection/ConfigurationTest.php
-
identifier: offsetAccess.nonOffsetAccessible
path: tests/DependencyInjection/ConfigurationTest.php
# `validateClaims` throws `ValidationException`, but the throw happens behind
# the abstract `authenticate()` the test fixture overrides, so PHPStan's
# throw-type analysis can't see it reach the catch. The test deliberately
# asserts the wrap behaviour by catching the concrete type.
-
identifier: catch.neverThrown
path: tests/Security/OpenIdLoginAuthenticatorTest.php
# Manager tests assert `getProvider()` returns an `OpenIdConfigurationProvider`
# as a "didn't throw on construction" smoke check. The return type already
# guarantees the class, so phpstan-phpunit flags the assertion as redundant.
# A follow-up should replace these with behavioural assertions on the
# constructed provider; until then the assertion documents intent.
-
identifier: method.alreadyNarrowedType
path: tests/Security/OpenIdConfigurationProviderManagerTest.php