我正在使用symfony3并尝试设置MongoDB。我正在关注Symfony文档Symf Doc Mongo。
在使用本文档的Composer部分安装捆绑包时,建议安装这两个捆绑包:
"doctrine/mongodb-odm": "~1.0",
"doctrine/mongodb-odm-bundle": "~3.0"
我正在努力做到这一点,但是当我作曲家更新时,我得到了这些错误:
Problem 1
- doctrine/mongodb-odm 1.0.0 requires doctrine/mongodb ~1.2 -> satisfiable by doctrine/mongodb[1.2.0, 1.2.1, 1.2.2, 1.3.0].
- doctrine/mongodb-odm 1.0.1 requires doctrine/mongodb ~1.2 -> satisfiable by doctrine/mongodb[1.2.0, 1.2.1, 1.2.2, 1.3.0].
- doctrine/mongodb-odm 1.0.2 requires doctrine/mongodb ~1.2 -> satisfiable by doctrine/mongodb[1.2.0, 1.2.1, 1.2.2, 1.3.0].
- doctrine/mongodb-odm 1.0.3 requires doctrine/mongodb ~1.2 -> satisfiable by doctrine/mongodb[1.2.0, 1.2.1, 1.2.2, 1.3.0].
- doctrine/mongodb-odm 1.0.4 requires doctrine/mongodb ~1.2 -> satisfiable by doctrine/mongodb[1.2.0, 1.2.1, 1.2.2, 1.3.0].
- doctrine/mongodb-odm 1.0.5 requires doctrine/mongodb ~1.2 -> satisfiable by doctrine/mongodb[1.2.0, 1.2.1, 1.2.2, 1.3.0].
- doctrine/mongodb 1.3.0 requires ext-mongo ^1.5 -> the requested PHP extension mongo is missing from your system.
- doctrine/mongodb 1.2.2 requires ext-mongo ^1.2.12 -> the requested PHP extension mongo is missing from your system.
- doctrine/mongodb 1.2.1 requires ext-mongo ^1.2.12 -> the requested PHP extension mongo is missing from your system.
- doctrine/mongodb 1.2.0 requires ext-mongo ^1.2.12 -> the requested PHP extension mongo is missing from your system.
- Installation request for doctrine/mongodb-odm ~1.0 -> satisfiable by doctrine/mongodb-odm[1.0.0, 1.0.1, 1.0.2, 1.0.3, 1.0.4, 1.0.5].
我不明白我应该从哪里开始。
答案 0 :(得分:0)
我认为您还应该通过键入alcaeus/mongo-php-adapter
来安装composer require alcaeus/mongo-php-adapter
软件包,并手动添加"provide"
部分(如果不存在),并显示以下内容:
"provide": {
"ext-mongo": "1.6.14"
},