Skip to content
This repository was archived by the owner on May 29, 2026. It is now read-only.

fix: bring CI green — PHPCS 0 errors, Psalm 0 errors, PHPUnit 153/153#658

Merged
rubenvdlinde merged 1 commit into
developmentfrom
fix/phpcs-phpunit-psalm-sweep
May 27, 2026
Merged

fix: bring CI green — PHPCS 0 errors, Psalm 0 errors, PHPUnit 153/153#658
rubenvdlinde merged 1 commit into
developmentfrom
fix/phpcs-phpunit-psalm-sweep

Conversation

@rubenvdlinde

Copy link
Copy Markdown
Contributor

Summary

  • PHPUnit: Added IUserSession mock to GisProxyControllerTest::setUp(); configure getUser() to return a non-null mock so all 7 tests pass (was: 7 ArgumentCountError failures)
  • PHPCS: Ran phpcbf (auto-fixed 1,549 errors); merged 515 standalone @spec docblocks into their preceding full docblocks (retrofit spec work left dual-docblock anti-pattern that PHPCS saw as missing short-desc/@return/@param); hand-fixed 2 ! operator violations in ParaferingAuditListener and WfsExportService
  • Psalm: Cast DOMNodeList->item(0) to DOMElement before calling getElementsByTagName in StufController (×3); add @psalm-suppress UnusedParam to 3 private methods with intentional future-use params; suppress InvalidTemplateParam on ParaferingAuditAppendOnlyValidator; baseline ObjectDeletingEvent, LockedException, Db\Mapping, ZgwController, OC_Util as OR-peer/NC-internal stub gaps in psalm.xml

Before / After

Check Before After
PHPUnit 7 errors / 153 tests 0 errors / 153 tests
PHPCS errors 3,462 0
Psalm errors 14 0

Deferred (architectural debt, not in scope)

  • PHPMD complexity violations (LhsController CC≥10, MigrateWorkflowDefinitions CC 19, etc.) — separate PRs needed
  • 212 PHPCS warnings (missing @SPEC tags on classes) — surfaced in CI but do not block merge per phpcs.xml config

PHPUnit: Add IUserSession mock to GisProxyControllerTest setUp; configure
getUser() to return a non-null IUser so all 7 controller tests pass.

PHPCS: Run phpcbf (auto-fixed 1,549 of 3,462 errors); merge 515 standalone
@SPEC docblocks into their preceding full docblocks (the retrofit spec work
left a dual-docblock anti-pattern that PHPCS counted as missing short-desc /
@return / @param); hand-fix 2 remaining `!` operator violations.

Psalm: Cast DOMNodeList->item(0) to DOMElement before calling
getElementsByTagName (StufController ×3); add @psalm-suppress UnusedParam to
3 private methods with intentionally unused future-use params; suppress
InvalidTemplateParam on ParaferingAuditAppendOnlyValidator; baseline
ObjectDeletingEvent, LockedException, Db\Mapping, ZgwController, OC_Util as
OR-peer / NC-internal stub gaps in psalm.xml.
@rubenvdlinde rubenvdlinde merged commit 42e8cb3 into development May 27, 2026
@rubenvdlinde rubenvdlinde deleted the fix/phpcs-phpunit-psalm-sweep branch May 27, 2026 14:11
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant