我应该在我的版本控制中保留 symfony.lock 吗?
Should I keep symfony.lock in my version control?
我开始使用 Symfony Flex 来 bootstrap 我的项目,我意识到 运行 composer install
第一次生成一个名为 symfony.lock
的文件我找不到文档。
这个文件有什么作用?我应该将它保留在我的版本控制中并部署它还是应该 .gitignore 它?
是的,正式你必须将它添加到版本控制中:
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 再次生成,使用 recipes and triggering bugs like this https://github.com/symfony/flex/issues/192
自动配置所有已安装的包
我开始使用 Symfony Flex 来 bootstrap 我的项目,我意识到 运行 composer install
第一次生成一个名为 symfony.lock
的文件我找不到文档。
这个文件有什么作用?我应该将它保留在我的版本控制中并部署它还是应该 .gitignore 它?
是的,正式你必须将它添加到版本控制中:
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 再次生成,使用 recipes and triggering bugs like this https://github.com/symfony/flex/issues/192
自动配置所有已安装的包