punktde / dotenv-adapter
Dynamically decide which .env files to load.
Installs: 31 663
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 6
Forks: 0
Open Issues: 0
Requires
- php: ^7.2 || ^8.0
- helhum/dotenv-connector: ^3.0
- symfony/dotenv: ^5.1
This package is auto-updated.
Last update: 2024-10-07 11:38:52 UTC
README
Dynamically decide which .env files to load.
Install
composer require punktde/dotenv-adapter ^1.0.0
composer config extra.helhum/dotenv-connector.env-file /usr/local/etc/app.env
composer config extra.helhum/dotenv-connector.adapter 'PunktDe\DotenvAdapter\DotenvAdapter'
Usage
# echo FOO=foo > foo.env && echo FOO=bar > bar.env # ENV_FILE=/tmp/foo.env:/tmp/bar.env php print_foo.php bar # FOO=baz ENV_FILE=/tmp/foo.env:/tmp/bar.env php print_foo.php baz