Repository navigation
[access] refactor(object): SaveObject takes a services bundle and its three access guards - #7594
Conversation
…cess guards The 30-parameter constructor becomes four: SaveObjectServices (nested bundles of at most four: mappers, records, runtime, property handlers, value handlers, platform, tenancy) plus PropertyRbacHandler, PermissionHandlerInterface and FolderManagementHandler, which stay direct constructor parameters. Every collaborator keeps its own typed private property, assigned one by one, so behaviour and the tests that set a collaborator by reflection are unchanged. Optional collaborators keep their null defaults inside the bundles, so DI autowiring resolves the same services as before. Every test that builds SaveObject by hand now builds the bundles. Assisted-by: ClaudeCode:claude-opus-5-5
|
The red Newman API Test Suite check does not come from this PR. The PHPUnit step inside the Nextcloud container fails with 11 errors and 11 failures. None of them are in files this diff touches. The failing tests are:
The same set fails on unrelated open PRs #7541, #7543, #7538, #7540 and #7575. Outside the container these tests pass on plain The tests this PR changes pass in the same run, including every test that builds SaveObject. Generated by Claude Code |
|
The red The gate reports 14 translation keys used in The fix is a separate Generated by Claude Code |
|
Most locales are missing two keys that No fix exists yet. The fix is translating those two keys in each locale (docs/l10n-workflow.md §6.15), and it belongs in its own per-locale commits. Generated by Claude Code |
|
The red
No fix exists yet for either. Both belong outside this PR. Generated by Claude Code |
|
The red phpcs reports 11 errors, all in files this PR does not change:
These errors are already on No fix exists yet, and those files belong to other lanes, so the fix is outside this PR. Generated by Claude Code |
|
The red eslint reports 769 problems (16 errors, 753 warnings) in No fix exists yet. It needs an eslint cleanup in its own PR. Generated by Claude Code |
|
Psalm reports 60 errors across 35 files under
These errors are already on No fix exists yet. These files belong to other lanes, so the fixes do not belong in this PR. Generated by Claude Code |
|
The red Seven whole-tree gates fail, with the same counts as on the unrelated open PR #7541 and on #7540 and #7575:
The diff-scoped gates pass. This PR changes no controller, so gates 7, 17 and 49 cannot have picked up anything from it. Gates 12 and 40 check Vue files, which this PR does not touch. The new bundle classes carry only the No fix exists yet. These are gate debts already on Generated by Claude Code |
|
The check fails with about 620 findings, and about 616 of them are already on This PR adds four new findings that are not on
These four do not decide the check, because it stays red without them. They should still be removed. I have not pushed to this PR, because under the lane rules an open PR is finished. The follow-up I propose:
The coordinator can decide whether that lands here or as a follow-up PR after this one merges. Generated by Claude Code |
Quality Report — ConductionNL/openregister @
|
| Check | PHP | Vue | Security | License | Tests |
|---|---|---|---|---|---|
| lint | ✅ | ||||
| phpcs | ❌ | ||||
| phpmd | ❌ | ||||
| psalm | ❌ | ||||
| phpstan | ❌ | ||||
| phpmetrics | ✅ | ||||
| eslint | ❌ | ||||
| stylelint | ✅ | ||||
| build | ✅ | ||||
| check-specs | ✅ | ||||
| test-l10n | ❌ | ||||
| test-l10n-parity | ❌ | ||||
| format | ❌ | ||||
| check-schema-l10n | ✅ | ||||
| test-coverage-ratchet | ✅ | ||||
| composer | ✅ | ✅ 168/168 | |||
| npm | ✅ | ✅ 641/641 | |||
| app:check-code | ⏭️ | ||||
| info.xml | ✅ | ||||
| REUSE | ✅ | ||||
| lockfile sync | ✅ | ||||
| PHPUnit | ❌ cancelled — no verdict | ||||
| Newman | ❌ 1625/1628 | ||||
| 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-09 19:03 UTC
Download the full PDF report from the workflow artifacts.
Lane K17 (round 10c), SIG unit interfacing: the
SaveObjectconstructor.What changed
SaveObject::__constructgoes from 30 parameters to 4. It now takesSaveObjectServicesplus the three access guards, which stay direct constructor parameters:PropertyRbacHandler,PermissionHandlerInterfaceandFolderManagementHandler(assertFolderIsAccessible).SaveObjectServicesnests final bundles of at most 4 parameters each, all inlib/Service/Object/SaveObject/:persistence:SaveObjectPersistence, which holdsSaveObjectMappers(object, unified, schema, register),SaveObjectRecords(audit trail, trail settings, TMLO, activity stamper) andSaveObjectRuntime(cache, object sources, flow-run context, container)handlers:SaveObjectHandlers, which holdsSaveObjectPropertyHandlers(metadata, file, linked entity, computed field) andSaveObjectValueHandlers(translation handler, projection, status, field encryption)platform:SaveObjectPlatform(session, URL generator, logger, event dispatcher)tenancy:SaveObjectTenancy(organisation service, group manager, app config)private readonlyproperty, assigned one by one in the constructor. Method bodies are untouched, and the tests that set a collaborator by reflection on a constructor-less instance still work.= nulldefaults inside the bundles, so the DI autowiring resolves the same services (or the same null) as before. SaveObject is still autowired through the ContractBindings aliases, and no registrar change is needed.@SuppressWarnings(PHPMD.ExcessiveParameterList)on the constructor is removed because the warning no longer applies.Tests
SaveObjectby hand now build the bundles. I made this change mechanically and kept every argument's value.SaveObjectsTesthas its 1 pre-existing skip.Numbers (lane_measure K17, this branch alone)
AI-assisted: written by Claude Code (Claude) for lane K17.
Generated by Claude Code