Closed
Description
It would be helpful to be able to specify an array of paths in the DotEnv constructor:
$env = new DotEnv([__DIR__, dirname(__DIR__)]);
The semantics would be that the first path that contains a .env file would be used.
The use-case is that sometimes it's better to put .env outside of your project root, e.g. if your project code is deployed separately from .env or if you're using a common .env for multiple projects.
Would you accept a PR to this effect?
Metadata
Metadata
Assignees
Labels
No labels