Skip to content

fix(router): use Json\encode for encoding when sending json responses#2199

Merged
brendt merged 1 commit into
tempestphp:3.xfrom
NeoIsRecursive:fix/throw-error-when-recieving-invalid-json
Jul 7, 2026
Merged

fix(router): use Json\encode for encoding when sending json responses#2199
brendt merged 1 commit into
tempestphp:3.xfrom
NeoIsRecursive:fix/throw-error-when-recieving-invalid-json

Conversation

@NeoIsRecursive

Copy link
Copy Markdown
Contributor

I got an issue where my json responses got no output, turns out it was because I had "binary strings" in my object, and since the json_encode didn't throw and I forgot those values existed it took forever for me to debug :3

I figured using the tempest encode function would be better than just adding the throw flag.

@NeoIsRecursive NeoIsRecursive changed the title fix: use Json\encode for encoding when sending json responses fix(router): use Json\encode for encoding when sending json responses Jul 6, 2026
@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown

Benchmark Results

Comparison of fix/throw-error-when-recieving-invalid-json against 3.x (8838c1ecb7bf585b2e176d1163cf643c22999b82).

Open to see the benchmark results

No benchmark changes above ±5%.

Generated by phpbench against commit aa2651c

@brendt brendt merged commit 97a7811 into tempestphp:3.x Jul 7, 2026
77 checks passed
@NeoIsRecursive NeoIsRecursive deleted the fix/throw-error-when-recieving-invalid-json branch July 7, 2026 06:41
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.

2 participants