Description
Q | A |
---|---|
Bug report? | yes |
Feature request? | no |
BC Break report? | yes |
RFC? | yes |
Symfony version | 3.4 |
Hello everyone.
It seems that we broke BC by merging #16265 in lower branches. The break was reported #17601, and yet the documentation needs some clarification too, see symfony/symfony-docs#6421.
The problem comes from the precedence of the uri passed to the client over the server parameters.
I must say I don't really understand the original bug since we're simulating the http context, and why we had to fix it since the fix basically reverts #10549.
And if there was a problem back then for HTTP_HOST, it still exists for HTTPS.
I encountered the BC break while migrating an app from Symfony 2.6 to 2.8.
Use case: dynamic sub domains need to be defined per request and this was done thanks to the server var HTTP_HOST
while relative paths are always used in WebTestCase
by convention, same as the doc issue.
I understand that it is now too late to revert that fix in 2.x branches, but I think we should definitely fix this is 3.4 by deprecating one way or the other, because in the end, the uri requested is not "synchronized" with those variables in some cases.
I suggest to deprecated the precedence of the guessing from uri in favor of server parameters for both HTTPS and HOST.
What do you think is best? Thanks!