Skip to content

Add typed JSON values for database queries - #428

Open
g105b wants to merge 3 commits into
masterfrom
377-json
Open

g105b wants to merge 3 commits into
masterfrom
377-json

Conversation

@g105b

@g105b g105b commented Nov 18, 2026

Copy link
Copy Markdown
Member

Adds phpgt/json and Row::getJson() to read JSON fields as typed objects. Stringable query parameters are serialised automatically, allowing JSON objects to be passed to insert and update queries.

Adds unit tests for JSON values and parameter conversion. Unit tests, coding standards and PHPStan pass. The full PHPMD check encounters an existing parser limitation in Row.php.

Closes #377.

@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 116 complexity · 0 duplication

Metric Results
Complexity 116
Duplication 0

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

This was referenced Nov 18, 2026
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.

Type safe getters for JSON fields

1 participant