Repository navigation
[access] refactor(people): share the register context of the seat, handover and role services - #5857
Merged
Merged
Conversation
… services before sharing it Assisted-by: ClaudeCode:claude-opus-5-5
…d role services CaseSeats, InternalHandover, LeaverHandoverService and CaseRoleProjection each carried a private copy of the object service, register and schema reading that Custody\DossierRegister already holds. Each now builds one DossierRegister from its settings and delegates to it; constructor signatures, return values and exception messages are unchanged. Assisted-by: ClaudeCode:claude-opus-5-5
rubenvdlinde
requested review from
WilcoLouwerse,
bbrands02 and
rjzondervan
as code owners
November 11, 2026 14:40
This was referenced Nov 11, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
CaseSeats,InternalHandover,LeaverHandoverServiceandCaseRoleProjectioneach carried a private copy of the register reading: the object service ("OpenRegister is not available"), the configured register ("Dossier register not configured") and a configured schema ("Dossiq schema not configured").Custody\DossierRegisteralready holds exactly that reading.Each class now builds one
DossierRegisterfrom theSettingsServiceit is given and its privatecontext()/requireRegister()andschema()delegate to it. Constructor signatures (positional and named), DI wiring, return values, exception classes and messages, and the order of the settings reads are unchanged. Methods of these files changed by open PRs (CaseSeats::nameCoordinatorin #5353,CaseSeats::clearCoordinatorin #5349,InternalHandover::writeCaseandLeaverHandoverService::recordOnCasein #5353) are not touched; they keep calling the same private methods.The path of
CaseRoleProjectionfalls under the access paths, hence the title prefix; no access decision is involved, the class only reads the register and schemas.Characterisation tests
tests/Unit/Service/People/RegisterContextCopiesTest.php, committed first and green on the old code: for all four classes (reached by reflection, the readings are private), the context pair, the refusal without OpenRegister (and that the register is then not read), the refusal without a register, a configured schema and the refusal of an unset schema key. 20 cases.What ran
phpunit -c phpunit-unit.xmlon the new test,tests/Unit/Service/People, the seat, handover, leaver and person-link test classes andtests/Unit/Architecture: 245 tests, all green but one inherited failure.phpcsandphpstan analyseon the touched files: no findings.Inherited:
ServiceCatchReturnsNullTest::testEveryAllowlistEntryNamesALiveSiteis red on development too (a stale allowlist entry forlib/Service/Settings/OpenRegisterBridge.php), untouched here.Duplication figures (duplicated 6-line windows, before -> after)
CaseSeats<->InternalHandover: 13 -> 1CaseSeats<->CaseRoleProjection: 9 -> 4DossierRegister<->CaseSeats(and the same for each of the other three): 6 -> 0What remains between them is the two-line delegate pair and unrelated row helpers.
AI-assisted: prepared with Claude Code (claude-opus-5-5); reviewed by a maintainer before merge.
Generated by Claude Code