[php-laravel] Use baseName instead of paramName for request lookup & validation keys#24400
Merged
wing328 merged 2 commits intoJul 24, 2026
Conversation
Contributor
There was a problem hiding this comment.
All reported issues were addressed across 9 files
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
…riding route parameters by the same name
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Hi there! Wanted to share one of the modifications we made to the php-laravel generator templates. This commit aims to fix a bug caused by case inconsistencies.
The php-laravel server templates read request values and build validation rules keyed by
paramName— the sanitized PHP identifier — instead ofbaseName. Laravel does not convert casing though, so request variables do not get parsed correctly.Example
Given a query parameter
filter_name:Before (generated — broken)
After (generated — fixed)
This is mostly a problem for form-data requests.
application/jsonis handled using Serde (de)serializer and is unaffected.PR is against master since it does not affect the interface other than fixing the actual bug.
Route parameters are not affected since these are resolved positionally. Intentionally did not change these so the generated interface classes are unaffected.
PR checklist
@ybelenko @gijs-blanken