Created
April 26, 2022 08:36
-
-
Save antoninhrlt/f77bb569082062d2931e7fbf6b7a088f to your computer and use it in GitHub Desktop.
Script to update composer (solved bug : `...array_merge() does not accept unknown named parameters...`)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# From : https://github.com/composer/composer/issues/9097#issuecomment-1100460289 | |
# NOTE Don't forget to restart bash to take the new composer program into consideration | |
set -e | |
apt-get remove composer | |
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" | |
php -r "if (hash_file('sha384', 'composer-setup.php') === '906a84df04cea2aa72f40b5f787e49f22d4c2f19492ac310e8cba5b96ac8b64115ac402c8cd292b8a03482574915d1a8') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" | |
php composer-setup.php | |
php -r "unlink('composer-setup.php');" | |
mv composer.phar /usr/local/bin/composer |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment