[solved] composer Content-Length mismatch

composer Content Length mismatch

 How to solve composer Content-Length mismatch error

Content-Length mismatch, received 573177 bytes out of the expected 761373
https://repo.packagist.org could not be fully loaded, package information was loaded from the local cache and may be out of date
Your requirements could not be resolved to an installable set of packages.

Just change the composer default repo url:

composer config -g repo.packagist composer https://packagist.org
composer config -g github-protocols https ssh

It changes or sets the packagist repo to be used by https only.

see other post @ qodrbee