Skip to content

refactor(stackiq): delete the unreferenced StackiqService and its three sub-services - #1415

Merged
rubenvdlinde merged 2 commits into
developmentfrom
refactor/sig-stackiq-delete-unused-services
Nov 4, 2026
Merged

rubenvdlinde merged 2 commits into
developmentfrom
refactor/sig-stackiq-delete-unused-services

Conversation

@rubenvdlinde

Copy link
Copy Markdown
Contributor

Stacked on #1412 (held). Held until #1412 merges. This PR deletes code only. Its own commit is the last one.

What

This PR deletes lib/Service/StackiqService.php (1,406 lines once #1412 has removed its organisation sync) and the three sub-services that were extracted from it: lib/Service/Stackiq/ApiClient.php, ConflictResolver.php and DataMapper.php (504 lines). Their tests go as well: StackiqServiceDecompositionTest, StackiqServiceOrganisationMapperTest, and the stale StackiqEventListenerTest, which skipped all 12 of its cases. #1413 deletes that last file too.

The other changes:

  • 5 phpstan-baseline entries and 2 phpmd-baseline entries for these files are removed.
  • One parity evidence citation that pointed at the deleted file is removed.
  • REQ-DECOMP-004 now records the removal instead of the decomposition it asked for.

Proof that nothing uses it

I ran each check on this branch:

  • Code: grep -rn StackiqService lib src appinfo templates finds only doc comments in the three deleted sub-services. The class is never imported, type-hinted or instantiated.
  • DI: lib/AppInfo/Application.php has no registration and no string service id ('OCA\Stackiq\Service\StackiqService' appears nowhere).
  • appinfo/info.xml: no background job, repair step, command or setting names it. Routes point at controllers, and no controller uses it.
  • Sub-services: ApiClient, ConflictResolver and DataMapper are referenced by no file at all, not even by StackiqService.
  • Tests: only the three deleted test files referenced it.
  • Other apps: a grep of lib/, src/ and appinfo/ in every sibling app under apps-extra finds no StackiqService and no OCA\Stackiq\Service\StackiqService.
  • Static analysis: phpstan over the whole of lib/ reports no errors after the deletion.

Numbers (PHP, lizard)

#1412 this PR development
unit LOC 39,432 38,395 41,153
size > 60 30.02% 29.19% 33.98%
McCabe > 10 16.06% 16.13% 18.28%
params >= 3 15.60% 15.82% 16.95%

The small rises in the McCabe and params shares come only from the smaller denominator. Nothing that remains changed.

Verified locally

  • The service and listener tests pass on this branch: 919 tests, 0 failures.
  • The full unit suite (pcov, --fail-on-risky) and the hydra gates are queued. Their results follow in a comment.

Assisted-by: ClaudeCode:claude-opus-5-5

…ee sub-services

No class in lib/, src/ or appinfo/ uses StackiqService: it has no DI
registration in Application.php, no string service id, no route, background
job, repair step or occ command, and no other app in the workspace references
it. ApiClient, ConflictResolver and DataMapper under lib/Service/Stackiq/ were
extracted from it and are not referenced by anything either. All four go
(1,910 lines), with their tests (StackiqServiceDecompositionTest,
StackiqServiceOrganisationMapperTest, and the stale StackiqEventListenerTest that
skipped all of its cases), their phpstan and phpmd baseline entries, and a
parity evidence citation pointing at the deleted file.

REQ-DECOMP-004 now records the removal instead of the decomposition it asked
for.

Assisted-by: ClaudeCode:claude-opus-5-5
@rubenvdlinde
rubenvdlinde marked this pull request as ready for review November 3, 2026 19:17
@rubenvdlinde

Copy link
Copy Markdown
Contributor Author

Local evidence: full unit suite (phpunit-unit.xml, pcov, --fail-on-risky, through heavy.sh) exit 0, 1611 tests, 0 failures, 0 risky, 47 skipped. Hydra gates --scope-to-diff --base origin/development: 38 of 38 applicable gates ran, 0 FAIL.

@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

Quality Report — ConductionNL/stackiq @ 3da729e

Check PHP Vue Security License Tests
lint ✅
phpcs ✅
phpmd ✅
psalm ✅
phpstan ✅
phpmetrics ✅
eslint ✅
stylelint ✅
build ✅
check-manifest ✅
check-vue-demi ✅
test-l10n ✅
format ✅
check-schema-l10n ❌
check-l10n-js ✅
composer ✅ ✅ 127/127
npm ❌ ✅ 807/807
app:check-code ⏭️
info.xml ✅
REUSE ❌
lockfile sync ✅
PHPUnit ✅ 1603/1603 · 8 skipped
Newman ⏭️
Playwright ⏭️ deferred: E2E runs locally and on the promotion path only. This pull request targets development, so the suite is asked once per promotion into beta and main rather than once per push per open pull request. Run it locally with npx playwright test, or from the Actions tab on a branch with no open pull request into development.
Hydra gates ❌

Quality workflow — 2026-11-03 23:41 UTC

Download the full PDF report from the workflow artifacts.

@rubenvdlinde
rubenvdlinde merged commit ea732c0 into development Nov 4, 2026
39 of 42 checks passed
@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

Quality Report — ConductionNL/stackiq @ 1648cb8

Check PHP Vue Security License Tests
lint ✅
phpcs ✅
phpmd ✅
psalm ✅
phpstan ✅
phpmetrics ✅
eslint ✅
stylelint ✅
build ✅
check-manifest ✅
check-vue-demi ✅
test-l10n ✅
format ✅
check-schema-l10n ❌
check-l10n-js ✅
composer ✅ ✅ 127/127
npm ❌ ✅ 807/807
app:check-code ⏭️
info.xml ✅
REUSE ❌
lockfile sync ✅
PHPUnit ✅ 1741/1741 · 8 skipped
Newman ⏭️
Playwright ⏭️ deferred: E2E runs locally and on the promotion path only. This pull request targets development, so the suite is asked once per promotion into beta and main rather than once per push per open pull request. Run it locally with npx playwright test, or from the Actions tab on a branch with no open pull request into development.
Hydra gates ❌

Quality workflow — 2026-11-04 12:30 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