[英]ZF2, doctrine-mongodb and PHP7
I update a simple skeleton project ZF2 to PHP7 and I install the libraries for mongodb in php7 我将一个简单的骨架项目ZF2更新为PHP7,并在php7中安装了mongodb的库
sudo pecl install mongodb
And I add in cli php.in the line 我在命令行添加cli php。
extension=mongodb.so
I do a phpinfo and the extension of mongodb is 1.1.3-dev. 我做了一个phpinfo,mongodb的扩展名是1.1.3-dev。
I try to install: 我尝试安装:
But I have an error. 但是我有一个错误。
doctrine/mongodb 1.2.1 requires ext-mongo ^1.2.12 -> the requested PHP extension mongo is missing from your system.....
The question is doctrine-mongodb is compatible with php7 and the php driver mongodb-1.1? 问题是doctrine-mongodb与php7和php驱动程序mongodb-1.1兼容吗?
Here my composer.json and I get it to work. 在这里,我的composer.json可以正常工作。 The "provide" is the more important here:
“提供”在这里更为重要:
"provide" : {
"ext-mongo": "*"
},
"require" : {
"php" : "^7.0",
"zendframework/zendframework" : "2.4.2",
"doctrine/doctrine-orm-module" : "0.*",
"zendframework/zend-developer-tools" : "1.0.0",
"zf-commons/zfc-user" : "1.*",
"zf-commons/zfc-user-doctrine-orm" : "1.0.1",
"bjyoungblood/bjy-authorize" : "1.4.0",
"evandotpro/edp-module-layouts" : "1.0",
"gedmo/doctrine-extensions" : "2.4.*",
"zendframework/zftool" : "dev-master",
"alcaeus/mongo-php-adapter" : "1.0.5",
"doctrine/doctrine-mongo-odm-module" : "0.10.0",
"eluceo/ical": "0.7.0",
"phpoffice/phpexcel": "1.8.1"
},
I moved from php5.5.9 on Ubuntu 14.04LTS to php 7 on Ubuntu 16.04.1LTS. 我从Ubuntu 14.04LTS上的php5.5.9迁移到Ubuntu 16.04.1LTS上的php 7。 The provide forces to retrieve the latest version.
提供力量来检索最新版本。 "Require" uses the one installed... Got it from here
“ Require”使用已安装的...从这里获取
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.