Repository navigation
Expand file tree
/
Copy pathphpstan.neon.dist
More file actions
84 lines (74 loc) · 4.25 KB
/
Copy pathphpstan.neon.dist
File metadata and controls
84 lines (74 loc) · 4.25 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
79
80
81
82
83
84
# Global ignores for fundamental framework patterns that PHPStan cannot resolve
# (Eloquent magic, generics, new static, etc.). This file is locked — new errors
# should be fixed at the source, or suppressed inline for genuine static analysis
# limitations.
includes:
- tests/Tenancy/Fixtures/PHPStan/bootstrap.neon
- src/phpstan/extension.neon
- src/tenancy/extension.neon
- vendor/phpstan/phpstan-deprecation-rules/rules.neon
parameters:
tmpDir: .cache/phpstan
level: 5
parallel:
jobSize: 20
maximumNumberOfProcesses: 32
minimumNumberOfJobsPerProcess: 2
inferPrivatePropertyTypeFromConstructor: true
treatPhpDocTypesAsCertain: false
paths:
- bin/sync-skeleton-config
- src
- src/sdk-generator/bin/hypervel-sdk
- src/testing/bin/hypervel-test-profile
scanFiles:
- phpstan-stubs/constants.php
- vendor/swoole/ide-helper/src/swoole/Swoole/Http/Response.php
- vendor/swoole/ide-helper/src/swoole/Swoole/Server.php
excludePaths:
- %currentWorkingDirectory%/src/helper/*
- %currentWorkingDirectory%/src/head/_ide_helper.php
- %currentWorkingDirectory%/tests/*
- %currentWorkingDirectory%/src/testbench/hypervel/*
- %currentWorkingDirectory%/src/testbench/workbench/*
- %currentWorkingDirectory%/src/*/node_modules/*
- %currentWorkingDirectory%/src/*/resources/views/*
- %currentWorkingDirectory%/src/*/publish/*
ignoreErrors:
# CreatesApplication is an open trait consumed by both PHPUnit test cases and the
# standalone Testbench application. PHPStan reports this shared capability guard
# in the consumer contexts, where an inline suppression in the trait cannot bind.
- message: "#^Call to function method_exists\\(\\) with .+ and 'beforeApplicationDe[^']*' will always evaluate to true\\.$#"
identifier: function.alreadyNarrowedType
path: src/testbench/src/Concerns/CreatesApplication.php
# InteractsWithTestCase is imported through several Testbench traits, so PHPStan reports this
# WithFixtures call once per import, and an inline ignore covers only one report.
- message: '#^Call to an undefined static method .+::setupWithFixturesForTestingEnvironment\(\)\.$#'
identifier: staticMethod.notFound
path: src/testbench/src/Concerns/InteractsWithTestCase.php
# protoc 35.1 emits a two-argument enum check, while google/protobuf 5.35.1
# declares the userland method with one argument and relies on PHP ignoring the extra value.
- identifier: arguments.count
path: src/grpc/src/Health/V1/HealthCheckResponse.php
# Framework traits provided for userland - not used internally but intentionally available
- '#Trait Hypervel\\[A-Za-z\\\\]+ is used zero times and is not analysed\.#'
# Schema definitions use Fluent's dynamic properties.
- '#Access to an undefined property Hypervel\\Support\\Fluent::\$#'
- '#Access to an undefined property Hypervel\\Database\\Schema\\ColumnDefinition::\$#'
- '#Access to an undefined property Hypervel\\Database\\Schema\\IndexDefinition::\$#'
- '#Access to an undefined property Hypervel\\Database\\Schema\\ForeignKeyDefinition::\$#'
- '#Access to an undefined property Hypervel\\Database\\Schema\\ForeignIdColumnDefinition::\$#'
# SoftDeletes trait methods - optionally mixed in, can't be statically verified
- '#Call to an undefined method .*::(getDeletedAtColumn|getQualifiedDeletedAtColumn|withTrashed|withoutTrashed|onlyTrashed|forceDelete|restore|trashed|isForceDeleting)\(\)#'
# Collections, paginators and InvokableComponentVariable keep Laravel's covariant TValue, so a
# narrower instance can be passed where a wider one is expected. Writes through the wider reference
# are checked against the wider type, so they can break the original reference's narrower contract.
- identifier: generics.variance
# Eloquent Relation subclass method overrides - covariance/contravariance issues with complex generics
# (e.g., Builder<*> vs Builder<TModel>, parameter type narrowing in overrides)
- identifier: method.childReturnType
path: src/database/*
- identifier: method.childParameterType
path: src/database/*
# Laravel's fluent factory pattern (Collection::make, Model::create, etc.) relies on new static() throughout
- '#Unsafe usage of new static#'