Commit 6e65fe3
committed
plan: fix v4.1.0 CI and release v4.1.1
AGENT_PLAN_ANCHOR
## Original User Request (verbatim)
quero
## Objective
Fix the PHPStan failures found after the v4.1.0 tag push, validate the project locally, publish a corrected patch release as v4.1.1, and monitor CI until a final result is known.
## Why This Plan
- The v4.1.0 tag was already pushed and CI failed, so the safest non-destructive release path is a new patch tag v4.1.1 rather than rewriting the existing remote tag.
- The reported failures are static-analysis issues caused by useless null-coalesce expressions on non-nullable typed properties/array offsets.
- The code changes should be minimal and behavior-preserving: remove impossible fallbacks where PHPStan proves the value is always present.
## Scope
- In scope: AbstractProvider.php and StatsParser.php fixes for PHPStan diagnostics; local analysis/tests; commit; tag v4.1.1; push branch/tag; CI monitoring.
- Out of scope: feature work, dependency updates beyond existing composer.lock state, release notes automation unless required by CI.
## Current Context
- Branch: main, aligned with origin/main before this plan except generated untracked desloppify artifacts.
- Current latest tag: v4.1.0, already pushed.
- Latest commit before this plan: 70eeebe chore: update composer.lock for v4.1.0.
- CI run 25469111120 failed in Static Analysis / PHPStan.
- PHPStan errors: AbstractProvider.php lines 123, 212, 232; StatsParser.php line 150.
## Constraints, Preferences, and Biases to Preserve
- Do not rewrite or delete remote tags unless explicitly asked.
- Keep changes minimal and behavior-preserving.
- Do not commit generated desloppify artifacts.
- Use PHP 8.4-compatible code.
- Push is allowed because the user requested a release.
## Assumptions to Validate
- Assumption: Removing useless null coalesce expressions fixes PHPStan without changing runtime behavior.
- Validation: composer run-script analyse.
- If false: inspect exact PHPStan output and adjust types/control flow minimally.
- Assumption: Fast test suite is enough for release validation unless CI exposes more.
- Validation: composer test or project equivalent from composer scripts.
- If false: run the relevant failing command from CI.
## Options Considered
- Accepted: Publish v4.1.1 patch release after fixing CI, because v4.1.0 was already pushed and failed CI.
- Rejected: Force-moving v4.1.0, because rewriting published tags is unsafe.
- Rejected: Suppressing PHPStan identifiers, because the code can be corrected directly.
## Execution Plan
- [ ] Step 1: Inspect failing code and apply minimal static-analysis fixes.
- Why now: The exact failing lines drive the implementation.
- Validation: Diff only touches required logic.
- [ ] Step 2: Run analysis and tests.
- Why now: Release should not proceed while CI-equivalent checks fail.
- Validation: composer run-script analyse and test command pass.
- [ ] Step 3: Commit the fix.
- Why now: The tag must point at a committed fix.
- Validation: git status contains only expected untracked generated artifacts or is clean.
- [ ] Step 4: Create and push v4.1.1, then monitor CI.
- Why now: Release is complete only after remote tag and CI result.
- Validation: git push succeeds and CI passes or final failure is reported.
## Do
- Keep the fix narrow.
- Preserve user and remote history.
- Report CI result clearly.
## Do Not
- Do not amend the published v4.1.0 tag.
- Do not commit credentials or generated scorecard artifacts.
- Do not broaden the release scope.
## References
- CI run: 25469111120
- PHPStan diagnostics: nullCoalesce.property, nullCoalesce.offset
- Research: PHPStan 2.0 stricter null-coalesce dead-code analysis.
## Risks and Dependencies
- Risk: Tests require unavailable external services.
- Mitigation: Run the CI-equivalent local commands and report any skipped/unavailable integration checks.
- Risk: Composer dependency state changed from the previous release.
- Mitigation: Do not change dependencies during this fix unless required by tests.
## Handoff Notes
- If interrupted, resume from this plan commit and continue at the first unchecked step.
- Existing v4.1.0 tag is intentionally left in place.
## Definition of Done
- PHPStan passes locally.
- Tests pass locally or any unavoidable skipped checks are explicitly reported.
- Fix commit references this plan.
- v4.1.1 tag is pushed.
- CI reaches a final result and is reported to the user.1 parent 70eeebe commit 6e65fe3
0 file changed
0 commit comments