Skip to content

refactor(facets): pass the facet request as one array - #1376

Merged
rubenvdlinde merged 2 commits into
developmentfrom
refactor/sig-facet-request
Nov 2, 2026
Merged

rubenvdlinde merged 2 commits into
developmentfrom
refactor/sig-facet-request

Conversation

@rubenvdlinde

@rubenvdlinde rubenvdlinde commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

What

FacetService::computeFacetsForRequest took the object service plus the request's schema, filters, search and organisation: five parameters. The four request values now travel as one $request array (schema, filters, search, organization), built at its one call site in getFacets(). The steps it runs (fetch the RBAC- and search-scoped base objects, resolve the modules, count, narrow) and the values each step receives are unchanged. The method is private.

SIG (gate 122 reader, lizard 1.24.3), php

php development (with #1374) this PR with #1351, #1375 and the federation PR 4-star 5-star
params >=3 19.77% 19.65% 18.64% 15.0% 7.5%
params >=5 4.40% 4.28% 3.28% 3.3% 1.65%
params >=7 0.75% 0.75% 0.76% 0.9% 0.45%

Size and McCabe bands do not change (the unit shrinks from 52 to 47 lines, McCabe 1). With the REVIEW PR #1375 (contact person sync), the federation-plan PR and the scope file #1351 together, php params >=5 reaches 3.28%, under the 3.3% 4-star limit; the margin is small (6 unit lines), so a new 5-parameter unit on development would undo it.

Verified

  • The 16 existing FacetServiceTest cases (search forwarded as _search, organisation scoping, filters, disjunctive narrowing, cache hit, dienst facets) pass on the old and the new code: 16 tests, 45 assertions each.
  • Capped mutants on the new wiring (prlimit --as=1610612736 timeout 120): 7 of 7 killed (search and organisation swapped or dropped, filters dropped in either step, each value dropped at the call site), the no-op control survived.
  • phpcs, phpstan, psalm, phpmd (0 findings) on the changed file; gate 122 ratchet 0 findings; diff-check gates, phpcs and phpstan PASS with 0 new (its phpunit step exits 255 on phpunit.xml's server bootstrap, as on development).
  • Full unit suite once under pcov with --fail-on-risky: 1,506 tests, the same 20 errors as development (Doctrine\DBAL\ParameterType missing locally), 0 risky.
  • development merged in before the push.

AI disclosure: prepared with Claude Code (claude-opus-5-5) and reviewed by the lane before opening.

computeFacetsForRequest took the object service plus schema, filters,
search and organisation as five parameters. The four request values now
travel as one array; the steps it runs and the values they receive are
unchanged.

Assisted-by: ClaudeCode:claude-opus-5-5
@rubenvdlinde
rubenvdlinde merged commit 14f9cd4 into development Nov 2, 2026
9 checks passed
@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Quality Report — ConductionNL/stackiq @ 898774c

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 ✅ 1486/1486 · 20 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-02 21:26 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