I never said that you can't change what is in the $_SERVER; my intention is to use the $_ENV values in addition to the $_SERVER.
There are plenty of workarounds; I just want to propose a simpler one that does not involve extra configuration when using Raven."
Sorry here the compose file
Hi,
Yes it works with php cli but when using it with apache it does not.
In order to reproduce it try this.
Put the two files in a folder and run docker compose up -d and go to localhost:85.
You could see that $_SERVER['SENTRY_ENVIRONMENT'] does not exist.
Hi
I usualy work with sentry and symfony on docker environment.
As using docker I manage some of my secret with .env file and sentry used it without custom code.
Globaly when using docker with environnement variable with php official image for example, all variables mentions in .env files are not available in your $_SERVER but in $_ENV.
For sure I could use a dotenv module or put some code inside my settings file, but I think that's it would be nice to use raven without adding another module or code to handle configuration.
I agree, I could add some code to provide value from $_ENV to $_SERVER.
For all other env var I need I use them in custom module and use $_ENV.
I complete the PR with test. Don't want to keep a non working branch even if you trash it.
Thanks fr for the clarification with $_ENV and getenv().
My purpose is not to replace the logic with $_SERVER but to also use $_ENV if needed.
The default configuration for PHP for variable order is EGPCS.
You could have the same issue if you run an application with an empty string for that configuration.
Have a value in $_SERVER or $_ENV is the same if you have multiple application running on a same process.
In this case I'm not sure the issue is where the env var are set but that you have different app that runs on the same process and could access to those values.
Sure I could use another module in order to add all my env variable to $_SERVER but I think it's dumb to add a complete module for 3 variables.
My need is that I run my apps with docker. All my per environment configuration are managed thru .env passed to docker.
Unfortunately, when I use this configuration env vars are not included in $_SERVER but in $_ENV.
I change my code to use $_ENV instead of getenv. I also mutualise those settings in one static class.
nguerinet → created an issue.
I'm working with this module and try to understand where the issue should be.
In KeycloakController file, the user is first logged out and then we try to redirect to keycloak logout with sso_token.
We are not redirect to /keycloak/logout?id_token=... because we are no longer connected.
The solution I try is to logout the user when the user is logged out from SSO (that's what we want) and only log out the user in Controller if KeycloakSignout is not enabled.
For the record I worked with the version 1.7 of the module
nguerinet → created an issue.