Skip to content
This repository has been archived by the owner on Feb 4, 2021. It is now read-only.

Do not load .env file in production #246

Closed
stevenrombauts opened this issue Oct 14, 2015 · 1 comment
Closed

Do not load .env file in production #246

stevenrombauts opened this issue Oct 14, 2015 · 1 comment
Labels
Milestone

Comments

@stevenrombauts
Copy link
Member

Using the .env file is only meant for development environments. In production the proper environment variables should be set. The load() method should not be called if any of the required variables are available.

See:

@stevenrombauts stevenrombauts modified the milestone: 1.0.1 Oct 14, 2015
@stevenrombauts
Copy link
Member Author

Current release of phpdotenv breaks when you skip the load() method. We will have to wait until vlucas/phpdotenv#102 is included in a next tagged release.

@johanjanssens johanjanssens changed the title Don't load .env in production environments Conditionally load .env file Oct 27, 2015
@johanjanssens johanjanssens changed the title Conditionally load .env file Do not load .env file in production Oct 27, 2015
@johanjanssens johanjanssens added this to the 1.0.1 milestone Oct 27, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants