Composer忽略版本匹配
在一次用composer 更新laravel的 vendor 时候
composer update
报了这个错:
Your requirements could not be resolved to an installable set of packages.
.....................................
- Installation request for jenssegers/mongodb 3.5.* -> satisfiable by jenssegers/mongodb[v3.5.0, v3.5.1, v3.5.2, v3.5.3].
To enable extensions, verify that they are enabled in your .ini files:
- D:\wamp64\bin\php\php7.2.14\php.ini
You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.
大致意思是我本地没有安装mongodb扩展,不能安装这个包;因为我还没用到mongodb 就偷个懒先不管了,参考这篇文章:
https://www.jianshu.com/p/eeac20c1f3fa
直接忽略版本匹配
// 忽略版本匹配
composer update --ignore-platform-reqs
然后就可以正常安装包了。
如果要安装mongodb扩展可以参考这篇文章: