Closed dev-bandai closed 5 years ago
In CakePHP3, reading using josegonzalez / php-dotenv is recommended. https://book.cakephp.org/3.0/en/development/configuration.html#environment-variables
It is possible to set variables from linux env.
export BAR=baz # you can optionally begin with an export statement https://github.com/josegonzalez/php-dotenv#usage
export
If you write as follows,"inspection info: Duplicate Key" will occur in all "export" locations
#!/usr/bin/env bash export APP_NAME=${ENV_APP_NAME:-"FooApp"} export DEBUG=${ENV_DEBUG:-true} export APP_ENCODING=${ENV_APP_ENCODING:-"UTF-8"} export APP_DEFAULT_LOCALE=${ENV_APP_DEFAULT_LOCALE:-"ja_JP"} export APP_DEFAULT_TIMEZONE=${ENV_APP_DEFAULT_TIMEZONE:-"Asia/Tokyo"}
Thank you.
Hi, @dev-bandai
I built the syntax for .env files without this 'export' keyword. But I'll try to fix this in the next version... At least the plugin won't show this warning.
2019.3 version is available.
In CakePHP3, reading using josegonzalez / php-dotenv is recommended. https://book.cakephp.org/3.0/en/development/configuration.html#environment-variables
It is possible to set variables from linux env.
If you write as follows,"inspection info: Duplicate Key" will occur in all "export" locations
Thank you.