Fix require reverting changes even though dependency resolution succeeded if when something fails afterwards, closes #10118
Fix require reverting changes even though dependency resolution succeeded if when something fails afterwards, closes #10118

nicolas-grekas/composer,milleruk/composer,stof/composer,alcohol/composer,composer/composer,staabm/composer,johnstevenson/composer