fix(GIT-1370): ADR cleanup pass for coverage-report Bucket 4#1432
Open
WilcoLouwerse wants to merge 1 commit intodevelopmentfrom
Open
fix(GIT-1370): ADR cleanup pass for coverage-report Bucket 4#1432WilcoLouwerse wants to merge 1 commit intodevelopmentfrom
WilcoLouwerse wants to merge 1 commit intodevelopmentfrom
Conversation
Address Bucket 4 findings from openspec/coverage-report.md: - SchemaMapper.php:892 — replace print_r() debug helper with json_encode() (ADR-003 / forbidden-debug-calls). - ReferentialIntegrityService.php:372 — fix MariaDB incompatibility: current_schema() is PostgreSQL-only. Now branches on database platform using DATABASE() for MySQL/MariaDB and current_schema() for PostgreSQL, mirroring MagicMapper.php:1697-1707. - RegisterService.php:418 — fix MariaDB incompatibility: CAST AS VARCHAR is non-standard on MariaDB. Now branches on platform using CAST AS CHAR for MariaDB/MySQL and CAST AS VARCHAR for PostgreSQL, mirroring MagicMapper.php:1346-1349. - All 10 db->prepare() raw-SQL sites now carry an explanatory comment describing why QueryBuilder cannot express the query (UNION ALL across dynamic magic tables, information_schema metadata access, foreign cross-app tables, platform-specific JSON-array operators, runtime- resolved table/column names) and noting MariaDB compatibility status. Refs: #1370, ConductionNL/.github#27
3 tasks
Contributor
Quality Report — ConductionNL/openregister @
|
| Check | PHP | Vue | Security | License | Tests |
|---|---|---|---|---|---|
| lint | ✅ | ||||
| phpcs | ✅ | ||||
| phpmd | ✅ | ||||
| psalm | ✅ | ||||
| phpstan | ✅ | ||||
| phpmetrics | ✅ | ||||
| eslint | ✅ | ||||
| stylelint | ✅ | ||||
| composer | ✅ | ✅ 147/147 | |||
| npm | ✅ | ✅ 598/598 | |||
| PHPUnit | ❌ | ||||
| Newman | ❌ | ||||
| Playwright | ⏭️ |
Quality workflow — 2026-05-05 22:11 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.
Summary
Closes #1370. Addresses the Bucket 4 findings from
openspec/coverage-report.mdgenerated 2026-04-30 (parent: ConductionNL/.github#27).SchemaMapper.php:892— replacedprint_r($value, true)withjson_encode($value)for the error-message string conversion (ADR-003 / forbidden-debug-calls).db->prepare()sites — each now carries an inline comment explaining why QueryBuilder cannot express the query and noting MariaDB compatibility status.The audit also surfaced two real MariaDB-incompat bugs that were fixed in the same pass since the codebase already contained portable counterparts to mirror:
ReferentialIntegrityService.php:372usedcurrent_schema()unconditionally — that function is PostgreSQL-only and would fail on MariaDB. Now branches on the database platform (DATABASE()for MySQL/MariaDB,current_schema()for PostgreSQL), mirroring the established pattern inMagicMapper.php:1697-1707.RegisterService.php:418usedCAST(... AS VARCHAR)unconditionally —VARCHAR(without length) is non-standard on MariaDB. Now branches on platform (CAST AS CHARfor MariaDB/MySQL,CAST AS VARCHARfor PostgreSQL), mirroringMagicMapper.php:1346-1349.Audit findings (per site)
RegisterService.phpReferentialIntegrityService.phpinformation_schema.tablesmetadata querycurrent_schema()fixReferentialIntegrityService.phpJSON_CONTAINS/jsonb @>operatorsLinkedEntityEnricher.phpoc_mail_messages)LinkedEntityEnricher.phpoc_cards)LinkedEntityEnricher.phpoc_calendarobjects)LinkedEntityEnricher.phpoc_calendarobjects)LinkedEntityEnricher.phpoc_talk_rooms)LinkedEntityEnricher.phpCacheHandler.phpThe issue body summary said "8" but the table actually lists 10 occurrences — all 10 are covered.
Test plan
php -lclean on all five edited files (verified locally)phpcsproduces no new warnings beyond pre-existing long-line warnings (verified locally)RegisterService::getSchemaObjectCounts()andReferentialIntegrityService::buildSchemaRegisterMap()no longer raise SQL syntax errors🤖 Generated with Claude Code