Skip to content

Conversation

sonnymilton
Copy link
Contributor

Q A
Bug fix? yes
New feature? no
Docs? no
Issues Fix #713
License MIT

This PR extends the query parameter normalization logic in AbstractModelCatalog to handle boolean-like strings ("true" / "false") in addition to numeric strings:

  • Query parameters such as ?think=true or ?think=false are now correctly converted to PHP booleans instead of remaining plain strings.
  • Conversion is applied recursively, so nested arrays produced by parse_str() also normalize their boolean values.
  • Numeric string handling is preserved as before.

Tests

New test cases were added to ensure:

  • Boolean string parameters are converted properly (true/false).
  • Recursive conversion inside nested query arrays works as expected.
  • Mixed parameters with numbers, booleans, and plain strings remain consistent.

@carsonbot carsonbot added Bug Something isn't working Platform Issues & PRs about the AI Platform component Status: Needs Review labels Oct 2, 2025
@OskarStark OskarStark force-pushed the model-options-boolean-strings branch from b3241b0 to f57c279 Compare October 2, 2025 11:42
@OskarStark
Copy link
Contributor

Thank you @sonnymilton for taking care of this regression.

@OskarStark OskarStark merged commit 7c6ed51 into symfony:main Oct 2, 2025
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Platform Issues & PRs about the AI Platform component Status: Reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Platform] Boolean options not supported in AbstractModelCatalog::parseModelName()
3 participants