Skip to content

re #96 delete level-6 baseline; document the 11 residual exceptions#112

Merged
tonydspaniard merged 1 commit into
masterfrom
chore/96-level6-residue
May 28, 2026
Merged

re #96 delete level-6 baseline; document the 11 residual exceptions#112
tonydspaniard merged 1 commit into
masterfrom
chore/96-level6-residue

Conversation

@tonydspaniard
Copy link
Copy Markdown
Member

Summary

Completes the level-6 milestone of #96: the baseline file is deleted and PHPStan runs clean at level 6 with an empty baseline.

The 11 findings that cannot be fixed at root cause within src-only analysis are converted into documented ignoreErrors (grouped, each with rationale) — the same kind of justified, tool/design-limitation exception as the existing ext-* stubs:

  • trait.unused (8) — public-API mixin traits (the Data entity traits, LogMessageTrait, EventStackAwareTrait, TagsAwareTrait) consumed by host applications and exercised by the framework's own test fixtures. PHPStan analyses src only, so it reports them as used zero times. (Adding tests/ to paths surfaces 1006 test-code findings — out of scope.)
  • missingType.generics (2)CookieCollection/SetCookieCollection intentionally diverge from Map<string, Cookie> (values() returns string cookie values, not Cookie objects), so no @extends binding is Liskov-valid without a compose-vs-extend refactor.
  • argument.templateType (1) — Cycle ORM's getRepository() parameter is class-string<T>|non-empty-string|T, an ambiguous union that blocks template inference; the concrete result is pinned via @var CycleNativeRepository<TEntity>.

Test plan

  • composer stan (PHPStan 2.1, no baseline) — [OK] No errors
  • No source changed (config + baseline removal only); cs/rector/tests unaffected

…ptions

The level-6 baseline is now empty and removed. The 11 findings that cannot be
fixed at root cause within src-only analysis are converted to documented
ignoreErrors (grouped, with rationale), in the same spirit as the ext-* stubs:

- trait.unused (8): public-API mixin traits (Data entity traits, LogMessage,
  EventStack, TagsAware) consumed by host apps and exercised by test fixtures;
  PHPStan analyses src only, so it reports them as used zero times.
- missingType.generics (2): CookieCollection/SetCookieCollection intentionally
  diverge from Map<string, Cookie> (values() returns string cookie values), so
  no @extends binding is Liskov-valid.
- argument.templateType (1): Cycle ORM getRepository()'s class-string<T>|
  non-empty-string|T union blocks template inference; result pinned via @var.

Level 6 reached with no baseline file (only documented ignoreErrors remain).
@tonydspaniard tonydspaniard merged commit 0fdd902 into master May 28, 2026
3 checks passed
@tonydspaniard tonydspaniard deleted the chore/96-level6-residue branch May 28, 2026 07:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant