dougan1330 2019-04-22 18:52
浏览 590

为什么.env文件优先于环境变量的.yaml文件?

What is/are the main reason(s), for which Symfony preferres to use .env files - for holding values of environment variables in them - instead of using the more flexible .yaml files?

I am asking this, because I read this comment, which states:

It was much simpler when we were using .yaml file.
I totally understand why we needed to switch to .env file, [...]

Thank you for your time.

  • 写回答

1条回答 默认 最新

  • doujiu8479 2019-04-23 16:52
    关注

    According to a Symfony blog post:

    Their main advantages are that they can be changed between deploys without changing any code and that they don't need to be checked into the code repository.

    The same cannot be said about yaml files.

    https://symfony.com/blog/new-in-symfony-3-2-runtime-environment-variables

    评论

报告相同问题?