fix(controllers): accept string UUIDs on action endpoints#852
Merged
rubenvdlinde merged 3 commits intoMay 22, 2026
Conversation
…t, /synchronizations/{id}/run|test
The chain-B/C OR cutover replaced auto-increment integer ids with UUIDs,
but five action-controller methods kept `int $id` parameters:
SourcesController::test lib/Controller/SourcesController.php:225
JobsController::run lib/Controller/JobsController.php:181
JobsController::test lib/Controller/JobsController.php:225
SynchronizationsController::test lib/Controller/SynchronizationsController.php:228
SynchronizationsController::run lib/Controller/SynchronizationsController.php:277
PHP coerces the inbound UUID string ("77637bae-01ec-4909-9f47-f2236fe7c3b1")
to int by taking the leading digits → 77. ObjectService::find(id: "77",
schema: '<schema>') then raises DoesNotExistException → the catch returns
404 Not Found. Every action-button click in the UI + every Newman
fixture POST to /sources/test/{uuid} silently 404s with no log written.
This is the root cause of the empty openconnector dashboard reported in
#838 — the journey tests "pass" because they
only assert response status, not semantic success, but the underlying
CallService / JobService / SynchronizationService never actually runs.
Switch `int $id` → `string $id` on all 5 methods. Drop the now-redundant
`(string) $id` cast at the `find()` call site (the param is already
a string). Update docblocks (`@param int $id` → `@param string $id ...UUID...`).
Discovered while investigating an empty openconnector dashboard.
Companion bugs filed at OR side:
- ConductionNL/openregister#1614 — honor x-openregister-archival annotation
- ConductionNL/openregister#1615 — eager magic-table creation on schema import
Closes #839.
…`sourceId` integer The openconnector_register.json descriptor declares `call_log.sourceId` as a legacy integer FK kept "during transition per chain-A REQ-A-008 (cleanup tracked at #821)", and a parallel `source` property typed `string format=uuid` ($ref to source schema) as the post-chain-B canonical reference. `CallService::call()` (and its 3 short-circuit paths for disabled source / missing location / rate-limited) write `'sourceId' => $source->getUuid()` — a UUID string being shoved into the legacy integer column. Postgres rejects: SQLSTATE[22P02]: Invalid text representation: 7 ERROR: invalid input syntax for type integer: "77637bae-01ec-4909-9f47-f2236fe7c3b1" Switch all four `'sourceId'` keys to `'source'` so the UUID lands in the correct column. The legacy integer column stays empty (NULL) — #821 tracks its removal once nothing reads it anymore. ## Verified end-to-end on the local container (After ConductionNL/openregister PR #1616 lands the eager magic-table creation that materialises `oc_openregister_table_65_223`:) TRUNCATE oc_openregister_table_65_223; // PHP CLI: CallService->call(source: $src, endpoint: '/get'); → row inserted with `source = '77637bae-...'`, status_code = 200 GET /api/objects/openregister/api/objects/openconnector/call_log → returns the row (after a manual UPDATE _owner='admin' workaround pending ConductionNL/openregister#1617 — system-context attribution) Same fix needed for the JobService / SynchronizationService write paths (jobId / synchronizationId → job / synchronization) — filed separately as #841 since those services have additional complexity (event_message also has the integer-FK problem on eventId / consumerId / subscriptionId). Companion changes shipping together in this PR: - 5 action-controllers `int $id` → `string $id` (the original commit) - This CallService field-name fix Both are "chain-B/C cutover type drift" bugs.
…ns' into fix/action-controllers-uuid-param-type
Contributor
Quality Report — ConductionNL/openconnector @
|
| Check | PHP | Vue | Security | License | Tests |
|---|---|---|---|---|---|
| lint | ✅ | ||||
| phpcs | ❌ | ||||
| phpmd | ✅ | ||||
| psalm | ✅ | ||||
| phpstan | ✅ | ||||
| phpmetrics | ✅ | ||||
| eslint | ✅ | ||||
| stylelint | ✅ | ||||
| composer | ✅ | ✅ 148/148 | |||
| npm | ✅ | ✅ 674/674 | |||
| PHPUnit | ⏭️ | ||||
| Newman | ⏭️ | ||||
| Playwright | ✅ |
Quality workflow — 2026-05-22 05:22 UTC
Download the full PDF report from the workflow artifacts.
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.
Reopening after i18n trunk was merged into development (the original PR auto-closed when its base branch was deleted). This PR retargets to development directly.
All commits from this branch that are not yet on development: see Files Changed for the consolidated diff.