Run composer without "Discard changes" question

You want to keep composer quite and just do its job? Then either set that to your composer.json config with

composer config --global discard-changes true

Which will add that config to your config.json and everbody will have this setting or you can just make this one liner to keep it shut.

COMPOSER_DISCARD_CHANGES=true composer install --no-interaction

or

COMPOSER_DISCARD_CHANGES=true composer update --no-interaction