Should I keep symfony.lock in my version control?

主宰稳场 提交于 2019-12-23 12:33:21

问题


I'm starting to use Symfony Flex to bootstrap my project and I realized that running composer install for the first time generates a file named symfony.lock for which I could find no documentation.

What does this file do? Should I keep it in my version control and deploy it or should I .gitignore it?


回答1:


Yes, officially you must add it to the version control:

Flex keeps tracks of the recipes it installed in the symfony.lock file, which must be committed to your code repository. http://symfony.com/doc/current/setup/flex.html#how-does-flex-work

Otherwise on staging or production stages it will be generated again by Flex, auto-configuring all installed packages with recipes and triggering bugs like this https://github.com/symfony/flex/issues/192



来源:https://stackoverflow.com/questions/47071211/should-i-keep-symfony-lock-in-my-version-control

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!