Add COMPOSER_DISCARD_CHANGE env var, refs #1188