punktde/dotenv-adapter

There is no license information available for the latest version (1.1.2) of this package.

Dynamically decide which .env files to load.

1.1.2 2022-08-22 15:11 UTC

This package is auto-updated.

Last update: 2023-01-22 16:01:59 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