Skip to content

fix(laravel): accept boolean query literals - #8520

Open
ousamabenyounes wants to merge 1 commit into
api-platform:4.3from
ousamabenyounes:fix/8481-laravel-boolean-validation
Open

fix(laravel): accept boolean query literals#8520
ousamabenyounes wants to merge 1 commit into
api-platform:4.3from
ousamabenyounes:fix/8481-laravel-boolean-validation

Conversation

@ousamabenyounes

Copy link
Copy Markdown
Contributor

Summary

  • accept the documented BooleanFilter literals during generated Laravel parameter validation
  • bind the filter's mapped native boolean value in Eloquent predicates
  • cover true and false through request-level regression tests

Test verification (RED → GREEN)

  • RED on upstream 4.3: published=true returned HTTP 422 from Laravel's boolean validator
  • GREEN after the patch: focused request test passed (1 test, 7 assertions)
  • patch-revert proof: reverting both production changes restored the HTTP 422 failure
  • full local validation: affected EloquentTest class passed (32 tests, 65 assertions), Laravel PHPStan reported no errors, and PHP CS Fixer reported no fixable files
  • changed-line coverage: PCOV recorded hits on both changed executable source lines (2/2, 100%)

Closes #8481

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