From 49f99d416fda52d2c10f0b83749338fedbbab758 Mon Sep 17 00:00:00 2001 From: Bob van de Vijver Date: Sat, 9 Jun 2018 14:21:12 +0200 Subject: [PATCH 1/2] Update dotenv usage --- components/dotenv.rst | 3 --- 1 file changed, 3 deletions(-) diff --git a/components/dotenv.rst b/components/dotenv.rst index fae35a5b5f2..66d70304ee5 100644 --- a/components/dotenv.rst +++ b/components/dotenv.rst @@ -66,9 +66,6 @@ You should never store a ``.env`` file in your code repository as it might contain sensitive information; create a ``.env.dist`` file with sensible defaults instead. -Symfony Dotenv should only be used in development/testing/staging environments. -For production environments, use "real" environment variables. - As a ``.env`` file is a regular shell script, you can ``source`` it in your own shell scripts: From 1e6c3ed999be4b5a354ba693d6415324d37d1a4e Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Mon, 11 Jun 2018 10:33:37 +0200 Subject: [PATCH 2/2] Recommend to use real env vars in production --- components/dotenv.rst | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/components/dotenv.rst b/components/dotenv.rst index 66d70304ee5..0d23cb12507 100644 --- a/components/dotenv.rst +++ b/components/dotenv.rst @@ -66,6 +66,13 @@ You should never store a ``.env`` file in your code repository as it might contain sensitive information; create a ``.env.dist`` file with sensible defaults instead. +.. note:: + + Symfony Dotenv can be used in any environment of your application: + development, testing, staging and even production. However, in production + it's recommended to configure real environment variables to avoid the + performance overhead of parsing the ``.env`` file for every request. + As a ``.env`` file is a regular shell script, you can ``source`` it in your own shell scripts: