8000 minor #9905 Update dotenv usage (bobvandevijver, javiereguiluz) · symfony/symfony-docs@c6f7c6d · GitHub
[go: up one dir, main page]

Skip to content

Commit c6f7c6d

Browse files
committed
minor #9905 Update dotenv usage (bobvandevijver, javiereguiluz)
This PR was submitted for the master branch but it was merged into the 3.4 branch instead (closes #9905). Discussion ---------- Update dotenv usage Based on the discussion in symfony/symfony#25643, I propose to remove this note. There is no downside of using dotenv in production, and it actually brings extra value when using a "simple" Linux installation, as the environments on console and web are automatically 'identical'. Commits ------- 1dc95f9 Recommend to use real env vars in production c82f04a Update dotenv usage
2 parents dab9585 + 1dc95f9 commit c6f7c6d

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

components/dotenv.rst

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,12 @@ You should never store a ``.env`` file in your code repository as it might
6969
contain sensitive information; create a ``.env.dist`` file with sensible
7070
defaults instead.
7171

72-
Symfony Dotenv should only be used in development/testing/staging environments.
73-
For production environments, use "real" environment variables.
72+
.. note::
73+
74+
Symfony Dotenv can be used in any environment of your application:
75+
development, testing, staging and even production. However, in production
76+
it's recommended to configure real environment variables to avoid the
77+
performance overhead of parsing the ``.env`` file for every request.
7478

7579
As a ``.env`` file is a regular shell script, you can ``source`` it in your own
7680
shell scripts:

0 commit comments

Comments
 (0)