recipes: --env no longer equivalent to APP_ENV
Related to https://github.com/symfony/recipes/pull/491
These two should be equivalent, shouldn’t they?
> APP_ENV=prod APP_DEBUG=0 bin/console cache:clear --no-warmup
> bin/console cache:clear --no-warmup --env=prod --no-debug
Reproducer:
> composer create-project symfony/skeleton skeleton
> cd skeleton
> rm -rf vendor
> composer install --no-dev #error will be here too.
> bin/console cache:clear --no-warmup --env=prod --no-debug
> Fatal error: Uncaught RuntimeException: The "APP_ENV" environment variable is not set to "prod". Please run "composer require symfony/dotenv" to load the ".env" files configuring the application. in project/src/.bootstrap.php on line 13
Thanks
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 19 (17 by maintainers)
@bendavies, I have the situation you describe. In my
Dockerfile:And effectively in
bootstrap.phpmy$_SERVER['APP_ENV']isnullso it tries to useDotEnvwhich isdevdependency. It is very counter-intuitive that--env=prodmakes environment non-prod at some point.