Skip to content

Commit

Permalink
[TASK] support loadEnv fallback files
Browse files Browse the repository at this point in the history
  • Loading branch information
infabo committed Nov 21, 2020
1 parent a18cede commit b3f75fa
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Adapter/SymfonyLoadEnv.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?php
declare(strict_types=1);

namespace Helhum\DotEnvConnector\Adapter;

use Helhum\DotEnvConnector\DotEnvVars;
Expand All @@ -9,7 +10,7 @@ class SymfonyLoadEnv implements DotEnvVars
{
public function exposeToEnvironment(string $dotEnvFile): void
{
if (file_exists($dotEnvFile)) {
if (is_file($dotEnvFile) || is_file("$dotEnvFile.dist")) {
$dotEnv = new Dotenv();
$dotEnv->usePutenv();
$dotEnv->loadEnv($dotEnvFile);
Expand Down

0 comments on commit b3f75fa

Please sign in to comment.