Reduce PHPStan baseline and fix type debt

Cerrado
#1,811 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
38/100
Tipo de issue
Refactorización
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
php

Línea de trabajo

After #1805 and PR #1806 are complete, run pnpm run stan and group findings from phpstan-baseline.neon by identifier, tracing entries into inc/, views/, and ultimate-multisite.php. Fix coherent type issues with focused PHPUnit coverage where needed, then remove only matching baseline entries; pnpm run stan, pnpm run quality, and relevant PHPUnit classes must pass without weakening compatibility rules.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

auto-dispatch blocked-by:GH#1805 origin:interactive priority:medium quality-debt status:blocked tier:standard

What

Reduce and eventually remove the 521-finding PHPStan baseline introduced by #1805 while preserving add-on compatibility rules for public APIs.

Why

The baseline restores a regression gate but represents substantial type debt. Fixing the findings will improve defect detection and make future PHPStan upgrades safer.

Tier

tier:standard — findings span many production components and require semantic type decisions, but the gate and rollback are established.

Files

  • phpstan-baseline.neon
  • phpstan.neon.dist
  • Production files named by baseline entries under inc/, views/, and ultimate-multisite.php

Reference pattern

Run pnpm run stan, fix underlying code or accurate PHPDoc, and remove only the matching count-specific baseline entry. Do not add public return declarations to extensible base classes, interfaces, gateways, integrations, UI base elements, models, or checkout APIs.

Implementation steps

  1. Group findings by identifier and prioritize real undefined-variable, argument, and return-contract defects.
  2. Apply small coherent fixes with focused regression tests where behavior is uncertain.
  3. Regenerate or hand-reduce the baseline only after each fixed group.
  4. Keep broad ignore rules and analysis level unchanged unless separately justified.

Acceptance criteria

  • Baseline finding count decreases materially.
  • No new broad ignore rule is introduced.
  • pnpm run stan passes.
  • Relevant focused PHPUnit tests pass.
  • Public extension compatibility constraints remain intact.

Verification

  • pnpm run stan
  • pnpm run quality
  • Focused PHPUnit classes for changed production code

Dependency

Blocked by #1805; begin after PR #1806 merges.


aidevops.sh v3.32.317 plugin for OpenCode v1.18.29 with gpt-5.6-sol spent 4h 26m and 539,830 tokens on this with the user in an interactive session.

Lenguaje dominante
PHP
Estrellas
218
Forks
87
Merge medio
1 d 3 h
PR fusionados (30 d)
101

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de Ultimate-Multisite/ultimate-multisite

Todos los issues de Ultimate-Multisite/ultimate-multisite

Issues similares

Más issues de PHP

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.