How to avoid composer discard changes message

smoreno picture smoreno · Nov 28, 2012 · Viewed 19.2k times · Source

I'm updating symfony verdors via composer. I always do it using:

php composer.phar update

But recent version of composer, before update each package show a message like this:

  - Updating doctrine/data-fixtures dev-master (a95d783 => a28b6bd)
The package has modified files:
M .gitignore
M .gitmodules
M LICENSE
M README.md
M UPGRADE
M composer.json
M lib/Doctrine/Common/DataFixtures/AbstractFixture.php
M lib/Doctrine/Common/DataFixtures/DependentFixtureInterface.php
M lib/Doctrine/Common/DataFixtures/Event/Listener/MongoDBReferenceListener.php
M lib/Doctrine/Common/DataFixtures/Event/Listener/ORMReferenceListener.php

-10 more files modified, choose "v" to view the full list Discard changes [y,n,v,s,?]?

How to avoid this?

Answer

lemats picture lemats · Sep 15, 2013

Set composer config to discard changes (see: https://github.com/composer/composer/pull/1188):

php composer.phar config --global discard-changes true