Skip to content

chore: sync canonical root configs + mechanical phpmd cleanup#1641

Merged
rubenvdlinde merged 1 commit into
developmentfrom
chore/sync-canonical-root-configs
May 21, 2026
Merged

chore: sync canonical root configs + mechanical phpmd cleanup#1641
rubenvdlinde merged 1 commit into
developmentfrom
chore/sync-canonical-root-configs

Conversation

@rubenvdlinde
Copy link
Copy Markdown
Contributor

Summary

Phase 2 fleet rollout of the root-config consolidation for the openregister foundation app. Pattern adapted from shillinq#300 and decidesk#243.

openregister has the largest follow-up scope of the fleet — note that phpmd / phpcs / psalm CI will be very red until #1640 is worked through. Admin-merge authorised by the user.

Config changes

  • phpcs.xml: sync canonical, restore OpenRegister description.
  • phpmd.xml: canonical, restore OpenRegister ruleset name.
  • psalm.xml: sync canonical with errorBaseline="psalm-baseline.xml" attribute added back; psalm-baseline.xml preserved untouched per fleet plan.
  • phpstan.neon: sync canonical (now uses phpstan-bootstrap.php instead of vendor/autoload.php; includes baseline).
  • phpstan-bootstrap.php: NEW from canonical.
  • phpstan-baseline.neon: regenerated with 1724 entries baselined; header points to Lint debt cleanup post-canonical-sync (Phase 2 fleet rollout) #1640.
  • phpcs-custom-sniffs/.../{SpecTagSniff,NoLegacyServerAccessorsSniff}.php: sniffs the synced phpcs.xml references.

Mechanical phpmd source cleanup (160 -> 59)

  • MissingImport (57 -> 0): added 25+ use statements across Application.php, BookmarksProvider, CalendarProvider, TasksProvider, ExternalIntegrationRouter, ResponseGenerationHandler, ObjectService, PdfReportWriter, UserService.
  • ElseExpression (15 -> 0): refactored to early-return / continue / default-then-override patterns.
  • UnusedFormalParameter (7 -> 0): @SuppressWarnings on deprecated facade signatures with TODO comments.
  • UnusedLocalVariable (2 -> 0): foreach key renamed to $_ with suppression.
  • BooleanArgumentFlag (2 -> 0): suppressed on requestHeaders($withBody) — body-vs-no-body is the natural HTTP-headers toggle.

Total mechanical fixes: ~80 violations cleared.

Quality gate state

Gate Before sync After sync (this PR)
phpcs errors n/a (per-app rules) 336 (SpecTag annotation debt + inline-if)
phpcs warnings n/a 3594 (SpecTag)
phpstan unmatched 0 (per-app config) 0 (1724 baselined)
psalm unbaselined 0 (per-app suppressions) 145 (stricter canonical config)
phpmd 160 59 (architectural only)

Test plan

Refs: #1640

Phase 2 fleet rollout of the root-config consolidation for the
openregister foundation app. Drops per-app phpcs/phpmd/psalm/phpstan
extensions in favour of the canonical from nextcloud-app-template,
then cleans the mechanical phpmd violations unmasked by the sync.

Config changes:
- phpcs.xml: sync canonical, restore OpenRegister description.
- phpmd.xml: canonical, restore OpenRegister ruleset name.
- psalm.xml: sync canonical + add errorBaseline="psalm-baseline.xml"
  attribute (psalm-baseline.xml preserved untouched per fleet plan).
- phpstan.neon: sync canonical (now uses phpstan-bootstrap.php instead
  of vendor/autoload.php; includes phpstan-baseline.neon).
- phpstan-bootstrap.php: NEW from canonical.
- phpstan-baseline.neon: regenerated with 1724 entries baselined.
  Header points to the tracking issue (#1640).
- phpcs-custom-sniffs/.../{SpecTagSniff,NoLegacyServerAccessorsSniff}.php:
  custom sniffs the synced phpcs.xml references.

Mechanical phpmd source cleanup (160 -> 59 violations):
- MissingImport (57 -> 0): added 25+ `use` statements across
  Application.php, BookmarksProvider, CalendarProvider, TasksProvider,
  ExternalIntegrationRouter, ResponseGenerationHandler, ObjectService,
  PdfReportWriter, UserService.
- ElseExpression (15 -> 0): refactored to early-return / continue /
  default-then-override patterns.
- UnusedFormalParameter (7 -> 0): added @SuppressWarnings on deprecated
  facade signatures with TODO comments.
- UnusedLocalVariable (2 -> 0): foreach key renamed to $_ with
  @SuppressWarnings to satisfy phpmd's strict ignore-name rule.
- BooleanArgumentFlag (2 -> 0): suppressed on requestHeaders($withBody)
  in OpenProjectProvider / XwikiProvider; body-vs-no-body is the
  natural HTTP-headers toggle.

Quality gates after sync:
- phpcs: 336 errors / 3594 warnings (CustomSniffs/Commenting SpecTag
  ADR-008 annotation debt + Squiz inline-if) - tracked in #1640.
- phpstan: 0 unmatched errors (1724 baselined per #1640).
- psalm: 145 unbaselined errors surfaced by the stricter canonical
  config - psalm-baseline.xml preserved untouched per fleet plan,
  follow-ups tracked in #1640.
- phpmd: 59 architectural violations remain (Cyclomatic/NPath/
  ExcessiveMethodLength/Coupling/StaticAccess/etc.) - tracked in #1640.

openregister has the largest follow-up scope of the fleet; phpmd /
phpcs / psalm CI will be red until #1640 is worked through. Admin
merge authorized.

Refs: #1640
@rubenvdlinde rubenvdlinde merged commit b4b7120 into development May 21, 2026
11 of 14 checks passed
@rubenvdlinde rubenvdlinde deleted the chore/sync-canonical-root-configs branch May 21, 2026 21:24
@github-actions
Copy link
Copy Markdown
Contributor

Quality Report — ConductionNL/openregister @ 40fa9de

Check PHP Vue Security License Tests
lint
phpcs
phpmd
psalm
phpstan
phpmetrics
eslint
stylelint
composer ✅ 162/162
npm ✅ 532/532
PHPUnit ⏭️
Newman ⏭️
Playwright ⏭️

Quality workflow — 2026-05-21 21:27 UTC

Download the full PDF report from the workflow artifacts.

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