我应该在我的版本控制中保留symfony.lock吗? [英] Should I keep symfony.lock in my version control?
问题描述
我开始使用Symfony Flex引导我的项目,并且我意识到第一次运行composer install
会生成一个名为symfony.lock
的文件,而我找不到该文件.
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.
此文件有什么作用?我应该将其保留在版本控制中并进行部署,还是应该.gitignore?
What does this file do? Should I keep it in my version control and deploy it or should I .gitignore it?
推荐答案
是的,正式地,您必须将其添加到版本控件中:
Yes, officially you must add it to the version control:
Flex跟踪在
symfony.lock
文件中安装的配方,该配方必须提交到您的代码存储库. https://symfony.com/doc/3.4/setup/flex#how-does-flex-work
Flex keeps tracks of the recipes it installed in the
symfony.lock
file, which must be committed to your code repository. https://symfony.com/doc/3.4/setup/flex#how-does-flex-work
否则,在阶段或生产阶段,它将由Flex再次生成,并使用食谱自动配置所有已安装的程序包并触发如下错误: https://github.com/symfony/flex/issues/192
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
这篇关于我应该在我的版本控制中保留symfony.lock吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!