You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tracking issue for the Phase 4 static-analysis program (AGENT.md §7, item 4.1).
Current state
PR #95 raised PHPStan to level 6 with a regenerated phpstan-baseline.neon (746 grandfathered errors). CI now enforces level 6 on all new/changed code; the baseline holds the existing debt.
The debt
The 746 baselined errors are overwhelmingly no value type specified in iterable type array — array declarations missing their array<K, V> value-type shapes. Fixing each requires understanding the concrete data shape, so this is per-package manual work, not automatable (Rector's TYPE_DECLARATION set is already applied and clean).
Plan (incremental, one PR per chunk)
Burn down the level-6 baseline package-by-package (add array<K,V> shapes, remove the corresponding baseline entries). Suggested order: smallest packages first (Structure, Common, Cookie), then larger (Http, Container).
When the baseline is empty (or near-empty), raise level 6 → 7, regenerate baseline, repeat burn-down.
Raise level 7 → 8, regenerate, burn down to zero.
Goal: phpstan-baseline.neon deleted, level: 8, no ignoreErrors beyond the documented ext-* stubs.
How to work it
# see remaining baselined errors for a package
vendor/bin/phpstan analyse src/Altair/<Package> --level=6 # without baseline include# after fixing a package, regenerate:
vendor/bin/phpstan analyse --generate-baseline
Don't hand-edit phpstan-baseline.neon — regenerate it. Fix at root cause (add the array<K,V> annotation), never widen types to silence the checker.
Acceptance criteria
Level reaches 8 with an empty/deleted baseline
Each raise is its own PR, CI-green (stan + rector --dry-run + cs)
No type widened just to pass; annotations reflect real data shapes
Tracking issue for the Phase 4 static-analysis program (AGENT.md §7, item 4.1).
Current state
PR #95 raised PHPStan to level 6 with a regenerated
phpstan-baseline.neon(746 grandfathered errors). CI now enforces level 6 on all new/changed code; the baseline holds the existing debt.The debt
The 746 baselined errors are overwhelmingly
no value type specified in iterable type array—arraydeclarations missing theirarray<K, V>value-type shapes. Fixing each requires understanding the concrete data shape, so this is per-package manual work, not automatable (Rector's TYPE_DECLARATION set is already applied and clean).Plan (incremental, one PR per chunk)
array<K,V>shapes, remove the corresponding baseline entries). Suggested order: smallest packages first (Structure,Common,Cookie), then larger (Http,Container).phpstan-baseline.neondeleted,level: 8, noignoreErrorsbeyond the documented ext-* stubs.How to work it
Don't hand-edit
phpstan-baseline.neon— regenerate it. Fix at root cause (add thearray<K,V>annotation), never widen types to silence the checker.Acceptance criteria