Skip to content

fix(laravel): validate header parameters against headers - #8711

Open
soyuka wants to merge 1 commit into
api-platform:5.0from
soyuka:fix/laravel-validate-header-parameters
Open

soyuka wants to merge 1 commit into
api-platform:5.0from
soyuka:fix/laravel-validate-header-parameters

Conversation

@soyuka

@soyuka soyuka commented Oct 16, 2026

Copy link
Copy Markdown
Member
Q A
Branch? main
Tickets Follows #8679, #8499
License MIT
Doc PR

ParameterValidatorProvider collected constraints of every parameter but validated them against $request->query->all(), so header constraints were checked against the query string: a required header was rejected even when sent, and satisfied by a same-named query parameter.

Header parameters are now validated against their resolved value. Query and headers run as two validator passes, so a header and a query parameter with the same name don't collide (query errors are reported first).

@soyuka
soyuka force-pushed the fix/laravel-validate-header-parameters branch from 4031d05 to 605610d Compare October 19, 2026 12:17
@soyuka
soyuka changed the base branch from main to 5.0 October 19, 2026 12:18
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