手动将yiisoft/mongodb下载到vendor/yiisoft目录(注意约束条件)。
在vendor/yiisoft/extensions.php 中添加
'yiisoft/yii2-mongodb' => array ( 'name' => 'yiisoft/yii2-mongodb', 'version' => '2.1.7.0', 'alias' => array ( '@yii/mongodb' => $vendorDir . '/yiisoft/yii2-mongodb/src', ), )