Skip to content

ADR cleanup pass — openregister coverage-report.md Bucket 4 #1370

@WilcoLouwerse

Description

@WilcoLouwerse

ADR Conformance Follow-up

Generated by /opsx-coverage-scan openregister on 2026-04-30 as part of the retrofit pass tracked in ConductionNL/.github#27. These findings are noise during retrofit but worth addressing in a separate cycle.

Bucket 4 findings

1. print_r() call in SchemaMapper (ADR-003 / forbidden-debug-calls)

File Line Finding
lib/Db/SchemaMapper.php 892 print_r() used for string conversion — replace with json_encode() or (string) cast

Fix: replace print_r($value, true) with json_encode($value) or (string) $value.

2. Direct SQL calls (ADR-001 / ADR-003)

8 occurrences of $this->db->prepare() bypassing QueryBuilder. These are in low-level cross-table query paths where QueryBuilder cannot express the required SQL, but need review for MariaDB compatibility (mariadb-ci-matrix spec intent):

File Lines
lib/Service/RegisterService.php 442
lib/Service/Object/ReferentialIntegrityService.php 373, 902
lib/Service/Object/LinkedEntityEnricher.php 121, 161, 247, 301, 347, 400
lib/Service/Object/CacheHandler.php 1770

Action: verify each SQL statement is MariaDB-compatible and add a comment explaining why QueryBuilder cannot be used here.

What to do

  • Fix SchemaMapper.php:892 — replace print_r() with json_encode()
  • Audit the 8 db->prepare() calls for MariaDB compatibility
  • Add inline comment to each db->prepare() site explaining why raw SQL is necessary

Source

openspec/coverage-report.md generated 2026-04-30 as part of the openregister retrofit (PRs #1364, #1365, #1368). Parent tracking issue: ConductionNL/.github#27.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions