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

chore: sync canonical root configs + mechanical phpmd cleanup - #127

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

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

Conversation

@rubenvdlinde

Copy link
Copy Markdown
Contributor

Phase 2 fleet root-config consolidation for openbuilt. Adopts the canonical phpcs.xml / phpmd.xml / psalm.xml / phpstan.neon / phpstan-bootstrap.php from nextcloud-app-template; pulls in the SpecTagSniff + NoLegacyServerAccessorsSniff custom sniffs; renames AppTemplate -> OpenBuilt in the two human-readable XML headers only.

The canonical phpcs and phpstan exclude lib/Resources/template/* (the verbatim template snapshot that openbuilt itself drove). psalm and phpmd still see that path — captured in the tracking issue rather than relaxed per-app.

Mechanical phpmd cleanup (13 violations)

  • 11 ElseExpression refactored to two-if pattern across ApplicationCreationService (5), OpenBuiltToolProvider (4), ProductionVersionGuardListener (1), SlugValidator (1).
  • 2 UnusedLocalVariable ($preset) dropped from ApplicationCreationService.

Out of scope (tracked)

Architectural phpmd debt (37 violations: ExcessiveClassComplexity, CyclomaticComplexity, NPathComplexity, etc.) and psalm UndefinedClass noise (mostly OR autoload visibility + template snapshot) stay unfixed per fleet directive — no per-app rule relaxation. phpstan-baseline.neon carries 2 errors (unused constant in MigrateToVersionedModel, legacy \OC accessor in IconService) so CI stays green.

Tracked in #126.

Quality gates after sync

Phase 2 fleet root-config consolidation. Adopts the canonical
phpcs.xml / phpmd.xml / psalm.xml / phpstan.neon /
phpstan-bootstrap.php from nextcloud-app-template; pulls in the
SpecTagSniff + NoLegacyServerAccessorsSniff custom sniffs; renames
"AppTemplate" -> "OpenBuilt" in the two human-readable XML headers
only. The canonical phpcs and phpstan now exclude
lib/Resources/template/* (the verbatim template snapshot that
OpenBuilt itself drove); psalm + phpmd still see it, captured in
the tracking issue.

Mechanical phpmd cleanup (13 violations):
  - 11 ElseExpression refactored to two-if pattern across
    ApplicationCreationService (5), OpenBuiltToolProvider (4),
    ProductionVersionGuardListener (1), SlugValidator (1).
  - 2 UnusedLocalVariable ($preset) dropped from
    ApplicationCreationService.

phpstan-baseline.neon captures 2 surviving errors (unused
constant in MigrateToVersionedModel + legacy \OC accessor in
IconService) so CI stays green while debt is tracked.

Architectural phpmd debt + psalm UndefinedClass noise stay
unfixed per fleet directive (no per-app rule relaxation);
tracked in #126.

Quality gates after sync:
  - phpcs:    0 errors, 150 warnings (spec/missing-import advisory)
  - phpstan:  0 errors (2 baselined)
  - psalm:    20 errors (OR autoload + template snapshot, #126)
  - phpmd:    37 violations (all architectural, #126)
@rubenvdlinde
rubenvdlinde merged commit c0d91f8 into development May 21, 2026
14 checks passed
@rubenvdlinde
rubenvdlinde deleted the chore/sync-canonical-root-configs branch May 21, 2026 20:35
@github-actions

Copy link
Copy Markdown
Contributor

Quality Report — ConductionNL/openbuilt @ 5f15dfa

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

Coverage: 0% (0/19 statements)


Quality workflow — 2026-05-21 20:37 UTC

Download the full PDF report from the workflow artifacts.

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