chore: sync canonical root configs + mechanical phpmd cleanup#243
Merged
Conversation
Pilot of the fleetwide root-config consolidation. 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 (adds SpecTagSniff/NoLegacyServerAccessorsSniff wiring, ignore_warnings_on_exit, vendor-bin + lib/Resources/template excludes, lineLimit 150). Preserves Decidesk description string. - phpmd.xml: byte-canonical (preserves Decidesk ruleset name). - psalm.xml: sync canonical (adds CalendarEventService + 16 other OCP/OR referencedClass entries fleetwide-promoted in nextcloud-app-template#49). - phpstan.neon: sync canonical (adds includes phpstan-baseline.neon, Doctrine\DBAL + broader OC\ + OCA\DAV\ + OCP stub-gap ignoreErrors, vendor-bin + lib/Resources/template excludePaths). - phpstan-baseline.neon: NEW, captures the 5 tracked phpstan errors that remain after canonical sync — all tracked in #242 for source-level cleanup. - phpcs-custom-sniffs/.../NoLegacyServerAccessorsSniff.php: NEW, copied from canonical so it can be referenced by the synced phpcs.xml. Source changes — 60 mechanical phpmd fixes across 12 service files: - 38 MissingImport: add `use Exception;` / `use DateTimeImmutable;` / `use InvalidArgumentException;` / `use RuntimeException;` / `use Throwable;` / `use DateTimeInterface;` at the top of each file and replace `\Foo` references with the short name. - 15 ElseExpression: refactor `if/else` into pre-assign default + conditional override (preserves behaviour, no `else` keyword left). - 3 UnusedLocalVariable: drop the variable assignment, keep the side-effect call where it exists (input validation). - 3 UnusedFormalParameter: annotate with `@SuppressWarnings(PHPMD.UnusedFormalParameter)` matching existing patterns in lib/AppInfo and lib/Mcp where the parameter is part of a required interface signature. - 1 @psalm-suppress UnusedReturnValue on ensureDraftMinutes() with comment noting current callsites only need the side effect. After this PR: - phpcs: 0 violations. - psalm: 0 errors. - phpstan: 0 unmatched (5 baselined per #242). - phpmd: 28 architectural violations remain (ExcessiveMethodLength, Cyclomatic/NPath complexity, Coupling, ExcessiveClassComplexity) - tracked in #242 for follow-up PRs. phpmd does not support a native baseline file, so its CI gate stays red until #242 closes. This is the agreed-upon tracked-debt pattern for the fleet: per-app deviations are forbidden, but a tracked GitHub issue with a removal plan is acceptable. The 1 BooleanArgumentFlag violation (VotingService::closeVotingRound's `bool \$anonymise` parameter) was left for #242 because it changes a public method signature.
Contributor
Quality Report — ConductionNL/decidesk @
|
| Check | PHP | Vue | Security | License | Tests |
|---|---|---|---|---|---|
| lint | ✅ | ||||
| phpcs | ❌ | ||||
| phpmd | ✅ | ||||
| psalm | ✅ | ||||
| phpstan | ✅ | ||||
| phpmetrics | ✅ | ||||
| eslint | ✅ | ||||
| stylelint | ✅ | ||||
| composer | ❌ | ✅ 100/100 | |||
| npm | ✅ | ✅ 475/475 | |||
| PHPUnit | ⏭️ | ||||
| Newman | ⏭️ | ||||
| Playwright | ⏭️ |
Quality workflow — 2026-05-21 20:09 UTC
Download the full PDF report from the workflow artifacts.
This was referenced May 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Pilot of the fleetwide root-config consolidation (template + 17 PHP apps). 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.Tracking: decidesk#242 for the architectural follow-ups.
Config changes
ignore_warnings_on_exit,vendor-bin/+lib/Resources/template/excludes, lineLimit 150). Preserves Decidesk description string.CalendarEventService+ 16 other OCP/ORreferencedClassentries fleetwide-promoted in nextcloud-app-template#49).includes phpstan-baseline.neon,Doctrine\DBAL+ broaderOC\+OCA\DAV\+ OCP stub-gapignoreErrors,vendor-bin/+lib/Resources/template/excludePaths).Source changes — 60 mechanical phpmd fixes across 12 service files
Quality gate status
phpmd does not support a native baseline file, so its CI gate stays red until #242 closes. This is the agreed-upon tracked-debt pattern for the fleet: per-app validation deviations are forbidden, but a tracked GitHub issue with a removal plan is acceptable.
The 1 `BooleanArgumentFlag` violation (`VotingService::closeVotingRound`'s `bool $anonymise` parameter) was left for #242 because it changes a public method signature.
Test plan