composer update 总是出错解决方法
提示错误:
Root composer.json requires phpunit/phpunit, it could not be found in any version, there may be a typo in the package name.
如果指定安装:composer require phpunit/phpunit
提示:
[InvalidArgumentException]
Could not find package phpunit/phpunit.
Did you mean one of these?
phpunit/phpunit
phpunit/phpunit-story
phpunit/phpunit-selenium
phpunit/phpunit-mink-trait
irstea/phpunit-shim
问题根源: composer 的源不对。原来的 https://packagist.phpcomposer.com
不太完整
解决: 换成 https://mirrors.aliyun.com/composer/
非常稳定
composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/
解除:
composer config -g --unset repos.packagist