官网
安装依赖包
$ composer require phpmailer/phpmailer
composer.json 文档
https://getcomposer.org/doc/04-schema.md
包提交
https://blog.csdn.net/xiaoxiong_web/article/details/72859219
https://segmentfault.com/a/1190000004294540
包提交以后composer require 的时候出现下面的错误:
[InvalidArgumentException] Could not find package diabolo/diabolo-framework at any version for your mi nimum-stability (stable). Check the package spelling or your minimum-stabil ity
原因是composer不会从代码库里面直接下载代码,而是需要release一个版本后才能require到。