Repository navigation
[access] refactor(object): reach four lib/Service/Object helpers through interfaces - #7592
Conversation
…h interfaces DestructionListRun and ObjectStateDeleteGuardListener built RetentionDestruction with new, and DraftExpiryJob called DraftRemovalFrame::asJob() statically, so both classes were named from lib/BackgroundJob and lib/Listener. They now implement RetentionDestructionInterface and DraftRemovalFrameInterface, bound in ObjectsBindings; the listener and the expiry job take the interface in their autowired constructors and the list run asks its container for it. Both frames keep their static state, so every instance reads the one count or acting job of the call stack: outcomes are unchanged. The destruction golden records the one extra container lookup per run; nothing else in it moves. Assisted-by: ClaudeCode:claude-opus-5-5
ObjectVersionGuard asked ConflictReports::from() for the container entry under ConflictReport's class id, so lib/Controller named a concrete lib/Service class. ConflictReportInterface is already an alias of ConflictReport in ContractBindings, so asking for the interface returns the same shared instance. The guard now does that, and ConflictReports, which had no other caller, goes. Assisted-by: ClaudeCode:claude-opus-5-5
…rgetsInterface CorrectionsController built CorrectionTarget with new. It now asks CorrectionTargetsInterface, bound to CorrectionTargets in ObjectsBindings, so lib/Controller no longer names the value object. The constructor keeps four parameters: it passes AppIdentity::APP_ID to the parent instead of receiving its own app id, as the other controllers already do. Assisted-by: ClaudeCode:claude-opus-5-5
…ntion-draft-frames
|
Newman API Test Suite ( The PHPUnit run inside that job reports 11 errors and 11 failures:
Why it is not this PR's:
No fix exists yet. I could not re-run the job from this session. Generated by Claude Code |
|
Generated by Claude Code |
|
PHPStan reports 24 errors, all in 12 files that this PR does not touch:
The errors are calls to methods that the interfaces do not declare, plus dead
They point to other lanes' interface swaps that are already merged into PHPStan on this PR's own touched files ( No fix exists yet. I could not re-run the job from this session. Generated by Claude Code |
|
Four more checks are red. None of the findings is in a file this PR changes.
This PR changes only PHP under No fix exists in this PR's scope. I could not re-run the jobs from this session. Generated by Claude Code |
|
I intersected this list with the PR's diff and nothing overlaps. Locally, phpcs reports no errors on this PR's touched files. The only warnings are two missing class-level As with the other quality checks above, these errors arrive with the merge of current Generated by Claude Code |
|
I ran
These failures arrive with the merge of current Generated by Claude Code |
|
Like the other quality checks above, this failure arrives with the merge of current 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.
Summary
SIG component-independence work, lane K15 (round 10c). Four concrete classes in
lib/Service/Objectwere named from other top-level components. Each of those callers now names only an interface, so the classes are hidden. This changes types only: no allowed or refused outcome changes.RetentionDestructionBackgroundJob/DestructionListRun,Listener/ObjectStateDeleteGuardListener(new)RetentionDestructionInterface. The listener gets it through its autowired constructor (2 → 3 params). The list run gets it from the container it already holds.DraftRemovalFrameBackgroundJob/DraftExpiryJob(staticasJob)DraftRemovalFrameInterface.asJobis now an instance method. The job's constructor goes 3 → 4 params, and its@SuppressWarnings(StaticAccess)goes because the static call is gone.ConflictReportsController/Support/ObjectVersionGuard(staticfrom)$container->get(ConflictReportInterface::class).ContractBindingsalready aliases that interface toConflictReport, so this is the same shared instance.ConflictReportshad no other caller and is deleted.CorrectionTargetController/CorrectionsController(new)CorrectionTargetsInterface::forRecord(). The constructor keeps 4 params: it passesAppIdentity::APP_IDto the parent instead of receiving$appName, asScopesController,SetupControllerand others already do.lib/Service/Bindings/ObjectsBindings.php:RetentionDestructionInterface,DraftRemovalFrameInterfaceandCorrectionTargetsInterface.Why
[access]The retention-destruction frame decides whether the delete guard lets a lock or the archive be bypassed. The draft-removal frame names the actor in the audit entry. Neither one's logic changes, and the guard check still runs before the delete.
Test Coverage
ObjectStateDeleteGuardListenerTestcovers the refusals (locked by someone else, archived) and the allowed cases (lock holder, the run holding the lock, open object, trashed row, retention destroying a locked and archived object). It passes on the old code and on the new code; only its constructor call changed.isRunning() === trueto=== falsefails 3 of its 8 tests. The mutation was reverted.DestructionExecutionJobGoldenTestrecords every container lookup. Its fixture gains exactly oneget RetentionDestructionInterfaceentry per case (12 cases). This is the deliberate new lookup; no other line in the fixture moves.ObjectsControllerVersionConflictGoldenTestnow expects the lookup underConflictReportInterface::class, which resolves to the same instance.DraftExpiryJobTestandCorrectionsControllerTestfollow the constructor changes. The newtests/Unit/Architecture/K15InterfaceBindingsTest.phpchecks that each binding is present and that each class implements its interface.tests/Unit/Architecture,Contract,Kernel,Service/Rules, all oftests/Unit/Controller(which includes both wiring tests),BackgroundJob,Listener,Service/ObjectandService/Bindings. Result: OK, 17155 tests, 7 skipped. All skips pre-existing.php -lpasses.@speconCorrectionsControllerand onDraftRemovalFrame, are already on development.phpmd.xml) reports nothing.tests/Unit/Architecture/C12/SmallServiceHelpers.phpstill says in a comment that the guard goes throughConflictReports. That file is a guard, so this PR leaves it unedited.Numbers (lane_measure.py, K15 scope)
RetentionDestruction17,CorrectionTarget11,ConflictReports9 andDraftRemovalFrame8.AI-assisted: this change was written by Claude Code and checked against the lane brief.
Generated by Claude Code