Skip to content

Commit

Permalink
Merge pull request symfony#247
Browse files Browse the repository at this point in the history
  • Loading branch information
symfony-flex-server[bot] authored Nov 23, 2017
2 parents fc076f0 + b3c5ff1 commit 391c470
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions behat/symfony2-extension/2.1/features/bootstrap/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,8 @@

// The check is to ensure we don't use .env in production
if (!isset($_SERVER['APP_ENV'])) {
if (!class_exists(Dotenv::class)) {
throw new \RuntimeException('APP_ENV environment variable is not defined. You need to define environment variables for configuration or add "symfony/dotenv" as a Composer dependency to load variables from a .env file.');
}
(new Dotenv())->load(__DIR__.'/../../.env');
}
3 changes: 3 additions & 0 deletions symfony/console/3.3/bin/console
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ if (!class_exists(Application::class)) {
}

if (!isset($_SERVER['APP_ENV'])) {
if (!class_exists(Dotenv::class)) {
throw new \RuntimeException('APP_ENV environment variable is not defined. You need to define environment variables for configuration or add "symfony/dotenv" as a Composer dependency to load variables from a .env file.');
}
(new Dotenv())->load(__DIR__.'/../.env');
}

Expand Down
3 changes: 3 additions & 0 deletions symfony/framework-bundle/3.3/public/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@

// The check is to ensure we don't use .env in production
if (!isset($_SERVER['APP_ENV'])) {
if (!class_exists(Dotenv::class)) {
throw new \RuntimeException('APP_ENV environment variable is not defined. You need to define environment variables for configuration or add "symfony/dotenv" as a Composer dependency to load variables from a .env file.');
}
(new Dotenv())->load(__DIR__.'/../.env');
}

Expand Down

0 comments on commit 391c470

Please sign in to comment.