Skip to content

feat(intake): portaliq tells OpenRegister which published forms write into a schema about to change - #1538

Merged
rubenvdlinde merged 2 commits into
developmentfrom
build/dep-dossiq-form-dependents
Oct 12, 2026
Merged

rubenvdlinde merged 2 commits into
developmentfrom
build/dep-dossiq-form-dependents

Conversation

@rubenvdlinde

Copy link
Copy Markdown
Contributor

Why

dossiq's decision 179 lane needs this. Before OpenRegister saves a schema it asks every app which published forms write into it (FormDestinationDependentsEvent, openregister #4563). Portaliq did not answer. A schema change could break a published portal form and nobody was told.

I checked on openregister development (c021ddb0) that the event is really dispatched: lib/Service/Form/FormDependentsCheck.php:96, called from SchemasController.

What happens now

  • Portaliq announces one form per published form binding whose destination is the schema about to change. It covers every portal.
  • Each form carries the mapping a submit of that binding sends, built against the proposed schema, and audience public.
  • When OpenRegister has a broken form unpublished, the binding goes back to draft. It keeps everything else.
  • A binding to a form on another host, and a binding that renders no form, are left out. They write nothing.
  • A read that fails does not break the schema save. It is logged as an error, because that save is then judged without portaliq's forms.

How

New or changed Test
Listener\FormDestinationDependentsListener (new) FormDestinationDependentsListenerTest, 6 tests
AppInfo\FormDependentsRegistrar (new), called from Application::register() FormDependentsRegistrarTest, 3 tests
PortalFormBindingResolver::allPublishedBindings() PortalFormBindingResolverTest::testEveryPortalsPublishedBindingsAreListedAndNoDraft
  • The listener test uses OpenRegister's real event, schema, validator and FormDependentsCheck. A schema that drops a property the form writes names the binding with property-unknown; applying the save writes status: draft.
  • The registrar test asserts the wiring from the caller. It runs the app's own register() and finds the listener on the event. I removed the call once as a control and the test failed.
  • A third test reads OpenRegister's source and asserts the event is dispatched there. It skips where OpenRegister is not loadable.
  • psalm.xml lists the two OpenRegister classes as optional sibling classes, like the other OpenRegister events.
  • Spec: REQ-PIFO-007 of submit-creates-the-case-directly gains the sentence and a scenario. Task 6b.1 is ticked, 6b.2 is the live check.

For the reviewer

  • The form is matched by schema slug, uuid or id. A binding stores its destination as register and schema slug. The event carries only the schema, so the register is not compared.
  • The author is the binding's owner (@self.owner). A binding without one gets no notification.
  • Unpublish writes through PortalObjectWriter, scoped to the binding's own portal. The diff adds no _rbac line.
  • The break setting is OpenRegister's. It reads formDestinationBreak for app portaliq, default unpublish. Portaliq sets nothing.

Checks, by exit code

Check Exit
composer lint, phpcs, phpmd, psalm, phpstan 0 each
vendor/bin/phpunit --no-coverage (full suite, against openregister development lib) 2: 3820 tests, 21 errors, all in the known local set that needs a Nextcloud server (CmsEditorControllerTest 1, ContentControllerTest 7, RenameDutchColumnsTest 13). No failure.
Hydra gates, scoped to the diff 1: gate 102 only, three manifest strings without a Dutch key. Inherited from development; #1532 fixes it.

No frontend file changed, so the npm checks were not run.

Still owed

Live check (task 6b.2): on an instance with dossiq, publish a binding into a case schema, remove a property its form writes, and save the schema. The save lists the binding under affected, the binding reads draft, and its owner gets the notification.

@github-actions

Copy link
Copy Markdown
Contributor

Quality Report — ConductionNL/portaliq @ 44c03de

Check PHP Vue Security License Tests
lint ✅
phpcs ✅
phpmd ✅
psalm ✅
phpstan ✅
phpmetrics ✅
eslint ✅
stylelint ✅
build ✅
check-specs ✅
check-manifest ✅
format ✅
check-l10n-js ✅
check-schema-l10n ✅
check-reuse ✅
composer ✅ ✅ 108/108
npm ✅ ✅ 984/984
app:check-code ⏭️
info.xml ✅
REUSE ✅
lockfile sync ✅
PHPUnit ✅ 3819/3819 · 1 skipped
Newman ✅ 1/1
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-10-12 18:26 UTC

Download the full PDF report from the workflow artifacts.

@rubenvdlinde
rubenvdlinde merged commit c40ae81 into development Oct 12, 2026
44 of 46 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant