php-pm / php-pm-httpkernel

HttpKernel adapter for use of Symfony and Laravel frameworks with PHP-PM
MIT License
246 stars 72 forks source link

remove check if APP_ENV is given to load dotenv #186

Closed xarem closed 1 year ago

xarem commented 2 years ago

In most symfony projects, there is a .env in the project root with default variables, f.ex.:

REDIS_DSN=redis://redis

If we run a docker-container with the env variable APP_ENV=prod, none of the default variables will be loaded because there is a check in the Symfony bridge, that the .env is only loaded if APP_ENV does not exist.

In our understanding, this should be removed and the default variables should always be loaded.

xarem commented 1 year ago

@andig is there a chance to merge this? Because we would like to switch to the upstream.