Home>Article>Development Tools> Share a problem encountered during the composer update process
This article is written by the tutorial column ofcomposerto share with you a problem encountered during the composer update process. I hope it will be helpful to friends in need!
Composer update process
My local composer has not been updated since May 2018. Now when using composer, it prompts that 2.0 has been released, so update it Give it a try!
According to the existing thinking, composer supports command updates, that is, using
composer self-update
, but it gave me a prompt
`SHA384 is not supported by your openssl extension, could not verify the phar file integrity `
Looking at the prompt, it is because there is no ability to Verify the legality of the phar. If this fails, go to the official documentation to find a solution.
Download the latest installation package:
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
Check the hash value of the downloaded file:
php -r "if (hash_file('sha384', 'composer-setup.php') === '756890a4488ce9024fc62c56153228907f1545c228516cbf63f885e036d37e9a59d27d63f46af1d4d07ee0f76181c7d3') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
Confirm successful installation:
php composer-setup.php
Remove link:
php -r "unlink('composer-setup.php');"
Move to environment:
mv ./composer-setup.php /usr/local/bin/composer
The above is the detailed content of Share a problem encountered during the composer update process. For more information, please follow other related articles on the PHP Chinese website!