Repository navigation
refactor(dossiq): read objects through find() with ObjectFindOptions - #5340
Closed
rubenvdlinde wants to merge 4 commits into
Closed
rubenvdlinde wants to merge 4 commits into
rubenvdlinde wants to merge 4 commits into
Conversation
openregister #9116 changes ObjectService::find() and findSilent() to take an ObjectFindOptions in place of the register, schema, extend, files, render and audit parameters. The calls on the object service move to find(id:, options: new ObjectFindOptions(...)); _rbac and _multitenancy stay named arguments, with their values unchanged. 104 calls were rewritten by the fleet migrate-find script, and six on receivers it does not match by hand. Assisted-by: ClaudeCode:claude-opus-5-5
The object-service doubles that declared find()/findSilent() with the old register, schema, extend, files, render and audit parameters now take `?ObjectFindOptions $options` and read those values from it. Their recorded calls and answers are unchanged. Assisted-by: ClaudeCode:claude-opus-5-5
…ions parent::find() calls in subclassed doubles pass the options through, the tests that call a double directly build an ObjectFindOptions, and the mock callbacks, return maps and with() expectations on find() read the register and schema from the options. Assisted-by: ClaudeCode:claude-opus-5-5
Doubles that log their arguments with compact() read register and schema from the options; old-typed find callbacks take the options; five golden logs record the ObjectFindOptions with the same values. The SchemaMapper doubles the earlier rewrite caught by their $_extend parameter are back on the mapper's own signature. Assisted-by: ClaudeCode:claude-opus-5-5
rubenvdlinde
marked this pull request as ready for review
November 10, 2026 12:00
rubenvdlinde
requested review from
Rem-Dam,
SudoThijn,
WilcoLouwerse,
bbrands02,
remko48 and
rjzondervan
as code owners
November 10, 2026 12:00
This was referenced Nov 11, 2026
Merged
3 tasks
Contributor
Author
|
Superseded by #6581 (merged into development), which moves every find/saveObject/deleteObject/patchObject/lock call and flow node in this app to openregister main's option objects in one pass, test doubles included. |
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.
Merge after openregister #9116 lands.
ObjectFindOptionsis new inOCA\OpenRegister\Kernel\Contracts\Valuein #9116, so this has to land with #9116 or after it.Fixed (lib)
ObjectService::find()/findSilent()on$objectService,$this->objectServiceand$this->getObjectService(), rewritten by the fleetmigrate-findscript (0 skipped; a second run changes nothing):find(id:, options: new ObjectFindOptions(register:, schema:, extend:, files:, render:, audit:), _rbac:, _multitenancy:). Default values are dropped._rbac/_multitenancystay named, with their values unchanged.Starter/StarterStore.php:314,Workflow/WorkflowDefinitionRepository.php:195and:402,Stuf/StufRegisterAccess.php:115,Transitions/CaseResultWriter.php:303,Bezwaar/BezwaarAuditTrail.php:213.Tests
tests/Stubs/Contract/ObjectServiceInterface.php:find()/findSilent()on #9116's signature.ObjectFindOptionsstub copied from #9116's head.?ObjectFindOptions $options = nulland read register/schema/extend/files from it. This was scripted; the diff is in the second commit.Tests (by hand)
parent::find()in subclassed doubles passes the options through. Tests that call a double directly build anObjectFindOptions. Mock callbacks,willReturnMaprows andwith()expectations onfind()read register and schema from the options. Doubles that log withcompact()set the locals they log.case-sharing-service,case-transfer-service,dso-case-service,objection-decision-service,objection-guard-listeners/*) now record theObjectFindOptionswith the same values.SchemaMapper::find()signatures that the scripted pass caught by their$_extendparameter are back on the mapper's own signature.Overlap
The audit PR (#5333) and the render PR (#5337) edit nearby lines in
BezwaarAuditTrail.php,StoppingRuleMet.php,WooReportReadLog.phpandPublicCaseSurvivorController.php. Whichever merges second needs development merged in.What ran
php -lon every changed file: clean.--no-coverage: 10,946 tests, 19 failures, the same 19 that fail on development (no new reds).AI disclosure: prepared with Claude Code (claude-opus-5-5).