Skip to content

Dynamically decide which .env files to load.

License

Notifications You must be signed in to change notification settings

punktDe/dotenv-adapter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

dotenv-adapter

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