Skip to content

refactor: widen Response body and Formatter data typing to mixed - #10480

Merged
paulbalandan merged 1 commit into
codeigniter4:developfrom
paulbalandan:response-format-body-mixed
Aug 24, 2026
Merged

refactor: widen Response body and Formatter data typing to mixed#10480
paulbalandan merged 1 commit into
codeigniter4:developfrom
paulbalandan:response-format-body-mixed

Conversation

@paulbalandan

Copy link
Copy Markdown
Member

Description
The formatters can genuinely take in any form of data but their phpdocs unnecessarily narrow down their inputs to array|object|string. This widens it to mixed. Consequently, Response::setJSON now also takes a mixed body instead of the incorrectly narrowed one.

Checklist:

  • Securely signed commits
  • Component(s) with PHPDoc blocks, only if necessary or adds value (without duplication)
  • Unit testing, with >80% coverage
  • User guide updated
  • Conforms to style guide

@paulbalandan paulbalandan added the refactor Pull requests that refactor code label Aug 23, 2026
@paulbalandan
paulbalandan force-pushed the response-format-body-mixed branch from 72a267f to cc7f71f Compare August 24, 2026 06:55
@paulbalandan
paulbalandan merged commit 590d8eb into codeigniter4:develop Aug 24, 2026
56 checks passed
@paulbalandan
paulbalandan deleted the response-format-body-mixed branch August 24, 2026 07:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactor Pull requests that refactor code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants