-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathphpstan.neon
More file actions
50 lines (47 loc) · 2.96 KB
/
Copy pathphpstan.neon
File metadata and controls
50 lines (47 loc) · 2.96 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
# Launchpad — Conduction PHPStan config.
#
# The shared base is the single source of truth. Everything here is either the
# app's own tracked debt or an ignore naming a symbol that exists in no other
# fleet app. Anything you are tempted to add that another app would also need
# belongs in the base, not here.
#
# No baseline: this app ships no `phpstan-baseline.neon`.
includes:
- vendor/conduction/hydra-gates/quality-config/phpstan-base.neon
parameters:
# App-specific only. The base already sets level, paths, bootstrapFiles,
# excludePaths, scanDirectories and every fleet-wide ignore.
scanFiles:
# AppHost engine base classes live in the sibling openregister app and are
# not in vendor/ here. scanFiles (not stubFiles) registers these symbols so
# the leaf Health/Metrics controllers' "extends unknown class" resolves,
# WITHOUT phpstan analysing/reporting the skeleton file itself (ADR-040).
- tests/phpstan/apphost-symbols.php
# Prevents false-positive "always true/false" errors caused by defensive runtime
# checks on values whose PHPDoc type is narrower than what callers may pass.
treatPhpDocTypesAsCertain: false
ignoreErrors:
# Doctrine\DBAL types used in migration table-builder helpers are valid at runtime
# but PHPStan cannot verify them without the Doctrine stubs available here.
- '#has invalid type Doctrine\\DBAL\\#'
# DataResponse constructor accepts plain array at runtime; OCP stub types
# it with a generic bound that PHPStan cannot satisfy when passing array directly.
- '#Parameter \$data of class OCP\\AppFramework\\Http\\DataResponse constructor expects#'
# Dynamic HTTP status codes from business rule validation results. The base covers
# the JSONResponse half; this app also passes them to DataResponse.
- '#Parameter (\#\d+ )?\$statusCode of class OCP\\AppFramework\\Http\\(JSON|Data)Response constructor expects#'
# HealthController takes OpenRegister's ManifestLoader/HealthCheckExecutor
# as `?object` ON PURPOSE — a parameter TYPE is itself a compile-time
# reference to a class that may not be installed, which is the whole point
# of the soft dependency (see the constructor docblock). The cost is that
# `$this->executor->execute(...)` returns mixed, so the JSONResponse payload
# built from `$result->checks` "contains unresolvable type".
#
# PHPStan 2 raises this as argument.unresolvableType where PHPStan 1 did
# not. Typing the parameters to fix it would reintroduce the hard
# dependency the design deliberately avoids, so the ignore is scoped to
# the one file and identifier rather than the app.
-
message: '#Parameter \#1 \$data of class OCP\\AppFramework\\Http\\JSONResponse constructor contains unresolvable type#'
identifier: argument.unresolvableType
path: lib/Controller/HealthController.php