Should composer.lock be committed to version control?

后端 未结 8 2101
攒了一身酷
攒了一身酷 2020-11-28 16:54

I\'m a little confused with composer.lock used in an application with a repository.

I saw many people saying that we should not .gitignore

8条回答
  •  情书的邮戳
    2020-11-28 17:52

    If you update your libs, you want to commit the lockfile too. It basically states that your project is locked to those specific versions of the libs you are using.

    If you commit your changes, and someone pulls your code and updates the dependencies, the lockfile should be unmodified. If it is modified, it means that you have a new version of something.

    Having it in the repository assures you that each developer is using the same versions.

提交回复
热议问题