-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathphpstan.neon
More file actions
78 lines (71 loc) · 2.99 KB
/
Copy pathphpstan.neon
File metadata and controls
78 lines (71 loc) · 2.99 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
66
67
68
69
70
71
72
73
74
75
76
77
78
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
# Analyse against the whole range composer.json declares (php ^8.3), not just the
# version this happens to run on. Without it PHPStan assumes the runtime PHP, so
# analysing on 8.3 says nothing about 8.5 and analysing on 8.5 would accept syntax
# that breaks 8.3 consumers.
#
# It does not cover the *dependency* axis, which is where this bundle's real
# findings have come from: Symfony 8.1 deprecations are invisible on PHP 8.3
# because symfony/http-kernel 8.1 requires PHP >= 8.4.1, so composer cannot install
# it here. Widening that needs a second job, not a setting.
phpVersion:
min: 80300
max: 80500
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