Back to the article list

24 Jul 2017

Support for .env files

A common practice in project development is to store some configuration options as environment variables. In development, testing, qa mode, using a .env file (pronounced "dot-env") is common instead of using "real" environment variables.

The built-in support of this technique was added in Symfony 3.3 and Symfony Flex, the new way to create projects in Symfony 3.4, will use it by default.

As more applications are migrating towards the usage of environment variables, we added support for .env.dist files in SensioLabsInsight.

To use it, create a .env.dist file in the working directory of your project and all environment variables defined in it will be accessible during Composer installation and during the analysis.

This feature helps supporting Symfony 4 and Symfony Flex on SensioLabsInsight and it also means that any project you have may now use environment variables easily (even non-Symfony projects).

Enjoy!

comments powered by Disqus