Skip to content

Commit 1308123

Browse files
committed
minor #12650 Add note about .env.local being ignored in test environment (clemherreman)
This PR was merged into the 4.3 branch. Discussion ---------- Add note about .env.local being ignored in test environment This PR add a short note, warning developers that the `.env.local` is always ignored on test environments. This surprised me, because I am using PHP VCR to isolate my test suite. I set my real API credential in a `.env.local`, however I was suprised to see they were not used when running my test suite against the real API. I am not sure about which branch I should target, so I aimed at the one when you click on "Edit this page" on the documentation page. Commits ------- 3a5c137 Add note about .env.local being ignored in test environment
2 parents 700db0a + 3a5c137 commit 1308123

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

configuration.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -627,6 +627,11 @@ the only mandatory file and each file content overrides the previous one:
627627
env vars overrides only for some environment. It's similar to ``.env.local``,
628628
but the overrides only apply to some particular environment.
629629

630+
.. note::
631+
632+
``.env.local`` is always ignored in test environment. The logic is that
633+
tests should always produce the same results for everyone.
634+
630635
.. note::
631636

632637
The real environment variables defined in the server always win over the

0 commit comments

Comments
 (0)