Repository navigation
[access] refactor(object): freeze, file store and facet/archive constructors take request objects and bundles - #7567
Conversation
…uest objects; two constructors bundled ArchiveHandler::freeze(identifier, reason, state, register, schema) now takes the ObjectStateRequest it already built (plus the state), and the private freezeRequested it forwarded to is folded in. ObjectStateController builds the request. The constructor keeps the object lookup, the update gate and the user session direct and takes the audit trail and log as ObjectStateRecording. Allowed and refused outcomes are unchanged: the transition and move-guard goldens pass, and removing the update check makes five of them fail. FacetHandler takes its object and schema lookups as FacetLookups; the property-read guard stays a direct, last, nullable parameter. FilePropertyHandler::processSingleFileProperty takes the FileStoreRequest it already built and the file input. Tests that build these classes or pin the call shape (including the frozen file contract's freeze expectation) follow, with the same values. Assisted-by: ClaudeCode:claude-opus-5-5
|
Newman API Test Suite: red, and not caused by this PR.
No fix for these failures exists on Generated by Claude Code |
|
This PR changes nothing under The checks fail on catalogue state that this PR inherits from
No fix for any of these exists yet, so there is nothing to port into this PR, and adding l10n work would widen it beyond its scope. Generated by Claude Code |
|
The only failing suite is No fix exists yet, so there is nothing to port into this PR. (The Generated by Claude Code |
|
eslint flags frontend files only, and this PR changes no No fix exists yet, so there is nothing to port into this PR. Generated by Claude Code |
|
Neither log names a file this PR changes ( No fix exists yet, so there is nothing to port into this PR. Generated by Claude Code |
|
phpstan reports 24 errors, the same count as on #7566, and none of them is in a file this PR changes. The errors are in classes such as No fix exists yet, so there is nothing to port into this PR. Generated by Claude Code |
|
CI runs the gates over the whole tree ( To check what this PR itself adds, I ran No fix exists for the tree-wide findings yet, and fixing them here would widen this PR well beyond its scope. Generated by Claude Code |
|
The phpmd output for this PR has 617 finding lines, against 616 on #7566, which does not touch these handlers. The tree-wide findings were already there. The difference is caused by this PR:
A fix that adds no The lane brief says an open PR is finished and must not receive further commits, so I have not pushed that change. A maintainer should decide: accept the one-step coupling increase, or have the fix land in a follow-up PR once 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 | ❌ 49041/49051 · 19 skipped | ||||
| 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 17:31 UTC
Download the full PDF report from the workflow artifacts.
What changed
Interfacing work (SIG unit interfacing, > 4 parameter band) on three object handlers. Lane K18, round 10c.
ArchiveHandler::freeze(identifier, reason, state, register, schema)→freeze(ObjectStateRequest $request, ?string $state = null). The method already built that request and forwarded it to a privatefreezeRequested(). That method is now folded intofreeze, andObjectStateControllerbuilds the request. The interface follows.ArchiveHandler::__construct(5 → 4): the object lookup, theupdategate (PermissionEnforcementInterface) and the user session stay as direct parameters. The audit trail and logger move into a newObjectStateRecordingbundle.FacetHandler::__construct(5 → 4): the object and schema mappers move into a newFacetLookupsbundle. The property-read guard stays a direct parameter, still last and nullable.FilePropertyHandler::processSingleFileProperty(objectEntity, fileInput, propertyName, fileConfig, index)→(FileStoreRequest $request, $fileInput). It already built that request on its first line. Its only production caller,storeFile, builds it now. The file stays non-strict, as it was.Access outcomes are unchanged. The archive transition and move-guard goldens pin both allowed and refused outcomes, and they pass. As a mutation check, removing the
updatepermission check makes 5 of them fail.Tests change only where they build these classes or pin the old call shape, with the same values. That includes the
freezeexpectation intests/Unit/Contract/FrozenFileWriteContractTest.php, which now expects the equivalent request object: it is not weakened. The HTTP route that the contract really protects is untouched.What ran
On this branch merged with current
origin/development, together with the lane's other branch:tests/Unit/Architecture,tests/Unit/Contract,tests/Unit/Kernel,tests/Unit/Service/Rules,ControllerServicesWiringTest,ControllerSessionWiringTest,tests/Unit/Service/Object,tests/Unit/Controller: all green.php -l,phpcs(only the pre-existing missing-@SPEC warnings) andphpstanon the touched files: clean.Numbers (lane_measure.py, K18)
UpsertOnKeyHandler::upsert(4) is left as is: its only caller,ObjectsController, is held by an open PR outside this round.Written with AI assistance (Claude Code).
Generated by Claude Code