2

I just ran a composer update on my local machine for my Symfony2 app, which also updated the projects composer.lock file.

Now I git add -A and git commit changes.

But when I git push my repository to my cloudControl deployment, I get the message:

Warning: The lock file is not up to date with the latest changes in
composer.json. You may be getting outdated dependencies. Run update
to update them.

I just ran the update. So what is wrong here?

1 Answer 1

1

I would imagine that if you get this on a remote machine after running update locally the only explanation is that you did not commit the composer.lock file.

4
  • I sure did. It was the only modification. I would've gotten a "Everything up-to-date" message if I didn't commit. By the way: Wouldn't this rather be a comment instead of an answer?
    – dialogik
    Commented Nov 19, 2013 at 16:29
  • 1
    Yes well I always find the line between comment and answer to be quite blurry. In any case this is very weird, but it means the md5 of composer.json doesn't match the stored hash in composer.lock for some obscure reason. Could be you are on windows and have CRLF line endings in composer.json but on the cloudControl deploy it's checked out with LF line endings only? Apart from that I can't imagine what would cause this.
    – Seldaek
    Commented Nov 19, 2013 at 22:30
  • So actually you get the "Everything up-to-date" message if you did not commit or push the same commit twice. Remember with Git you commit locally and then push to the remote. If the remote says, "Everything up-to-date" your pushing the exact same state. In your question you're only talking about updating since this is not a Git command I'm not sure what this is supposed to mean.
    – pst
    Commented Nov 20, 2013 at 9:22
  • Well, I ran the update, which changes the composer.lock file in my repository. And when I push, I did not get an Everything-up-to-date message (see above, I would have gotten that message, if nothing was changed or commited). So I pushed the just updated lock file but get the message, that I need to run update? Strange!
    – dialogik
    Commented Dec 8, 2013 at 10:02

Not the answer you're looking for? Browse other questions tagged or ask your own question.