@@ -617,21 +617,16 @@ following list shows the files loaded in all environments. The ``.env`` file is
617
617
the only mandatory file and each file content overrides the previous one:
618
618
619
619
* ``.env ``: defines the default values of the env vars needed by the application;
620
- * ``.env.local ``: defines machine-specific overrides for env vars on all
621
- environments. This file is not committed to the repository, so these overrides
622
- only apply to the machine which contains the file (your local computer,
623
- production server, etc. );
620
+ * ``.env.local ``: overrides the default values of env vars for all environments
621
+ but only in the machine which contains the file (e.g. your development computer).
622
+ This file should not be committed to the repository and it's ignored in the
623
+ `` test `` environment (because tests should produce the same results for everyone );
624
624
* ``.env.<environment> `` (e.g. ``.env.test ``): overrides env vars only for some
625
625
environment but for all machines;
626
626
* ``.env.<environment>.local `` (e.g. ``.env.test.local ``): defines machine-specific
627
627
env vars overrides only for some environment. It's similar to ``.env.local ``,
628
628
but the overrides only apply to some particular environment.
629
629
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
-
635
630
.. note ::
636
631
637
632
The real environment variables defined in the server always win over the
@@ -802,7 +797,7 @@ parameters at once by type-hinting any of its constructor arguments with the
802
797
803
798
// src/Service/MessageGenerator.php
804
799
namespace App\Service;
805
-
800
+
806
801
// ...
807
802
808
803
use Symfony\Component\DependencyInjection\ParameterBag\ContainerBagInterface;
0 commit comments