forked from nuwave/lighthouse
-
Notifications
You must be signed in to change notification settings - Fork 0
/
phpstan.neon
57 lines (47 loc) · 2.26 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
includes:
- vendor/bensampo/laravel-enum/extension.neon
- vendor/nesbot/carbon/extension.neon
- vendor/nunomaduro/larastan/extension.neon
- vendor/phpstan/phpstan-mockery/extension.neon
- vendor/phpstan/phpstan-phpunit/extension.neon
- vendor/phpstan/phpstan-phpunit/rules.neon
- vendor/thecodingmachine/phpstan-safe-rule/phpstan-safe-rule.neon
parameters:
level: max
paths:
- benchmarks
- src
- tests
excludePaths:
- tests/database/migrations/*
# Indirectly refers to \App\User (maybe through larastan?)
- tests/Utils/Models/User.php
# Intentionally wrong
- tests/Utils/Models/WithoutRelationClassImport.php
# Compatibility fix because Laravel moved the TestResponse class
- tests/TestCase.php
- tests/Laravel7ExceptionHandler.php
- tests/PreLaravel7ExceptionHandler.php
# As long as we support multiple Laravel versions at once, there will be some dead spots
reportUnmatchedIgnoredErrors: false
ignoreErrors:
# Some parts of Laravel are just really magical
- '#Parameter \#1 \$callable of static method Closure::fromCallable\(\) expects callable\(\): mixed, array\(\*NEVER\*, .*\) given\.#'
- path: tests/database/factories/*
message: '#Variable \$factory might not be defined#'
- '#Function factory invoked with 2 parameters, 0 required\.#'
- '#Function factory invoked with 1 parameter, 0 required\.#'
# This test cheats and uses reflection to make assertions
- path: tests/Unit/Schema/Directives/BaseDirectiveTest.php
message: '#Call to protected method getModelClass\(\) of class Nuwave\\Lighthouse\\Schema\\Directives\\BaseDirective\.#'
# This class or an equivalent of it will be present in a Laravel install
- '#.* unknown class App\\User\.#'
# This is a library, so it should be extendable
- '#Unsafe usage of new static.*#'
# Compatibility fix because Laravel moved the TestResponse class
- '#.*TestResponse.*#'
- '#Unable to resolve the template type ExpectedType in call to method PHPUnit\\Framework\\Assert::assertSame\(\)#'
# We are monkeypatching ResolveInfo to pass information through resolver middleware
- '#Access to an undefined property GraphQL\\Type\\Definition\\ResolveInfo::\$argumentSet\.#'
# This really has no type in root resolvers
- '#Method .* has parameter \$root with no typehint specified\.#'