Skip to content

Instantly share code, notes, and snippets.

@stefanotorresi
Created February 22, 2017 16:15
Show Gist options
  • Save stefanotorresi/36eb549c9d58bc14c90c313b4d0cd222 to your computer and use it in GitHub Desktop.
Save stefanotorresi/36eb549c9d58bc14c90c313b4d0cd222 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
composer install --no-dev
for DEP in $(composer show -N); do
echo
echo "*** downgrading ${DEP} ***"
echo
composer update $DEP --prefer-lowest --prefer-stable
composer test
TEST_FAILED=$?
if [[ $TEST_FAILED -gt 0 ]]; then
echo
echo "*** test failed when downgrading ${DEP} ***"
echo
exit 1
fi
composer update $DEP
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment