Fix composer peer fingerprint error for old PHP

This commit is contained in:
Shivam Mathur
2020-06-02 13:29:06 +05:30
parent 03eb8cc744
commit 6bd872ad2c
3 changed files with 12 additions and 0 deletions

View File

@ -139,6 +139,10 @@ add_tool() {
if [ -n "$COMPOSER_TOKEN" ]; then
composer -q global config github-oauth.github.com "$COMPOSER_TOKEN"
fi
# TODO: Remove after composer 2.0 update, fixes peer fingerprint error
if [[ "$version" =~ $old_versions ]]; then
composer -q global config repos.packagist composer https://repo-ca-bhs-1.packagist.org
fi
elif [ "$tool" = "phan" ]; then
add_extension fileinfo "sudo pecl install -f fileinfo" extension >/dev/null 2>&1
add_extension ast "sudo pecl install -f ast" extension >/dev/null 2>&1