Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

3
  • 3
    Thanks, I think this answer explains why you should version composer.lock, and if not, what the consequences are and if you can live with them. Commented Mar 17, 2020 at 13:40
  • 2
    That only works in case prod and dev are EXACTLY the same environment. If you have PHP 7.4 in prod and 8.0 in dev, it may result in different dependencies sets. If you include your .lock file, then you should also include your vendor directory. Commented Feb 23, 2022 at 8:23
  • @CarlosMora why would you work with different php version in dev and prod? This can only lead to unknown/undetected bugs since any test you can perform in the dev environment could fail in prod. As an example, you could write code using specific syntax of php 8 that can not be understand by php 7 and even if all your dev tests pass the prod environment fail.
    – dvdpzzt
    Commented Jan 19, 2023 at 15:02