shopware
shopware copied to clipboard
bin/console debug:container --env-vars not working
PHP Version
8.2
Shopware Version
6.5.7.1
Expected behaviour
Show all environment variables, with their values, referenced in Symfony's container configuration. See: https://symfony.com/doc/current/configuration.html#listing-environment-variables
Actual behaviour
The following error is shown:
[Symfony\Component\DependencyInjection\Exception\RuntimeException]
The default value of an env() parameter must be a string or null, but "int" given to "env(SHOPWARE_DBAL_TIMEZONE_SUPPORT_ENABLED)".
There are other env variables with the same issue:
- env(SHOPWARE_ES_INDEXING_BATCH_SIZE)
- env(APP_URL_CHECK_DISABLED)
- ...
How to reproduce
Run the following command: php bin/console debug:container --env-vars
We found the following existing issues which may help or are related to your topic:
- Environment Variables are not read if .env does not exist
- .env.local not respected on install
- EnvironmentHelper utility add support to transform variables before they are used
- Empty .env after installation
- APP_DEBUG=0 and custom monolog handler will not boot kernel due to exception: non-existent parameter "container.build_id"
- Remove Symfony Console deprecations
- The new app system only considers APP_URL set in an .env file but not as regular environment variable
- Setup command should also be able to generate a .env.local or .env.{environment}.local file instead of just a .env file
- Fix not defined env APP_URL on new setups