I'm trying to track down the php setting that is causing diffs in my composer.lock file.
Some machines produces:
"time": "2017-01-06T14:33:56+00:00"
On another machine:
"time": "2017-01-06 14:33:56"
I commit the composer.lock file in git and these different time format is causing unnecessary diff.
You see, while your composer. json file is a rough guide to the dependency versions that Composer should install, the composer. lock file is an exact record of the dependency versions that have been installed. That's right, it's recording what Composer has installed for you, right down to the commit hash.
You should commit the composer.lock file to your project repo so that all people working on the project are locked to the same versions of dependencies (more below). This is the main role of the update command. It then implicitly runs the install command.
composer. lock records the exact versions that are installed. So that you are in the same versions with your co-workers. composer install. Check for composer.lock file.
Composer changed the internally created timestamp format with version 1.3.0 - if you experience different results, make sure you update all your Composer installations to the most recent version (which is 1.3.1 at the time of writing) by running
composer selfupdate
or maybe
sudo composer selfupdate
depending on how Composer is installed.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With