php composer.phar require --prefer-dist light/yii2-swagger "~1.0.4" --dev
抛出异常如下:
failed to open stream: Permission denied
https://packagist.phpcomposer.com could not be fully loaded, package information was loaded from the local cache and may be out of date
解决办法:
sudo chown -R $USER ~/.composer/