Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork125
Merge $_ENV into $_SERVER earlier in phprouter file#333
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
Merge $_ENV into $_SERVER earlier in phprouter file#333
Conversation
tucksaun commentedJul 11, 2023
PHP documents the presence of So I think we are within spec here, your app should probably be fixed instead. |
tucksaun commentedJul 11, 2023
Also I don't quite understand how your application could even be reached if the router exited before the call to |
kick-the-bucket commentedJul 11, 2023
After that |
kick-the-bucket commentedJul 12, 2023
The problem is that the code in the |
tucksaun commentedNov 3, 2023
Oh ok sorry I got that the wrong way. So I believe the change might makes sense, but at the same time this is the location this merge has been present for quite a long time in Symfony so I'm not entirely sure of the consequences this could have... Another approach would be to change how we generate the env for the PHP CLI server to make sure the right keys are populated for wdyt@fabpot ? |
kick-the-bucket commentedDec 20, 2023
@tucksaun I actually like your version, no point in setting the variables on |
Tried running a non-symfony application with the symfony-cli local server and was puzzled why it could not detect that it's running on https. Apparently
'https' => 'on'was only set in$_ENV(that's done withrequire $envFile;), but not in$_SERVER, where PHP applications usually look for that parameter.This was because the
$_SERVER = array_merge($_SERVER, $_ENV);line was never executed, because the router exited a few lines before it withreturn false;.Also fixed a few whitespace and indentation inconsistencies.