Skip to content

Handle array query parameters in list converters#16

Merged
maltehuebner merged 2 commits intomainfrom
fix-array-query-parameters
Jan 27, 2026
Merged

Handle array query parameters in list converters#16
maltehuebner merged 2 commits intomainfrom
fix-array-query-parameters

Conversation

@maltehuebner
Copy link
Owner

Summary

  • Fix TypeError when query parameters contain arrays (e.g. ?param[]=a&param[]=b)
  • PHP parses param[]=value as an array, but RequestParameterList::add() only accepts strings
  • RequestToListConverter and ArrayToListConverter now join array values with comma before adding to RequestParameterList

Problem

RequestParameterList::add(): Argument #2 ($value) must be of type string, array given

Fix

Array values are joined with comma: ['a', 'b'] becomes "a,b". Consumers can split on comma if they need to handle multiple values.

🤖 Generated with Claude Code

maltehuebner and others added 2 commits January 27, 2026 20:48
PHP parses query strings like ?param[]=a&param[]=b as arrays.
RequestToListConverter and ArrayToListConverter now join array
values with comma before adding to RequestParameterList.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Replace TypeError expectations with assertions that verify correct
string conversion of arrays, integers, floats, and booleans in
list converters.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@maltehuebner maltehuebner force-pushed the fix-array-query-parameters branch from 76089b4 to 5370e5b Compare January 27, 2026 19:50
@maltehuebner maltehuebner merged commit 4ac20b5 into main Jan 27, 2026
4 checks passed
@maltehuebner maltehuebner deleted the fix-array-query-parameters branch January 27, 2026 19:54
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.

1 participant