-
-
Notifications
You must be signed in to change notification settings - Fork 368
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Value of $_SERVER['QUERY_STRING] different when deployed #756
Comments
@mnapoli Any ideas on when this can be addressed? I am happy to put a PR in myself just a little unsure about what you would expect in it. Other than updating the |
A first step that could be very useful would be to add a failing test case. You can start by looking at these tests: https://github.com/brefphp/bref/blob/master/tests/Event/Http/CommonHttpTest.php#L76-L126 and maybe try to write a new one? If that doesn't reproduce, then maybe you'll want to add it here: https://github.com/brefphp/bref/blob/master/tests/Handler/FpmHandlerTest.php If you see a solution feel free to implement it too. |
I am migrating a large Api-platform 2.7(SF 6.2, PHP 8.1) to Bref & Serverless, and I am blocked on this problem with (.) becoming (_). Our project has a lot of nested filters in the request query string, and they are not working anymore. |
FYI this PR might be very close to be merged: #1383 |
Heya! is there any movement on this issue? Experiencing exactly same issue (param names including dot have underscore in them once Bref stack is deployed). ApiPlatform makes use of dots pretty standart and having them converted makes it rather difficult to deal with. @mnapoli any work left / blocker on the PR mentioned? :) |
@sladg yes, the blocker is this: #1383 (comment) Feel free to open a new PR with these changes! |
@sladg, to move things forward with the project, we did an unorthodox thing until this PR gets merged. we searched for all the nested filters in the project,(order query string is not an issue), and replaced them back with (.) in the Kernel handle. `
} |
Description
When making a request to
/orders?billingAddress.surname=test
and accessing the value of$_SERVER['QUERY_STRING']
the expected value should be:Instead the value is:
When testing the issue locally using the
bref/fpm-dev-gateway
andbref/php-74-fpm-dev
images and dumping out the values from$_SERVER
the expected value can be seen.Cause
When an instance of
HttpRequestEvent
is created the methodHttpRequestEvent::rebuildQueryString
is called which passed the value throughparse_str
causing the conversion. This value is set on the request passed the the FPM process by:Which is here https://github.com/brefphp/bref/blob/master/src/Event/Http/FpmHandler.php#L182. I can also see it being used in the
Psr7Bridge
here https://github.com/brefphp/bref/blob/master/src/Event/Http/Psr7Bridge.php#L33The text was updated successfully, but these errors were encountered: