How to avoid composer discard changes message

后端 未结 4 1645
难免孤独
难免孤独 2020-12-29 03:31

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

php composer.phar update

But recent version of composer, before update ea

4条回答
  •  太阳男子
    2020-12-29 04:20

    both @lemats and @reza-sanaie's answers are incomplete as --no-interaction (-n) composer's option is required to have a real update without any question (see https://github.com/composer/composer/pull/1188#issuecomment-16011533).

    So after

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

    or after modifying composer.json

    "config": {
        "discard-changes": true
    },  
    

    use

    php composer.phar update -n
    

提交回复
热议问题