I try to install doctrine/mongodb-odm[1.0.5] over composer but drops me
Problem 1
- 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.
- 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].
- Installation request for doctrine/mongodb-odm ~1.0.5 -> satisfiable by doctrine/mongodb-odm[1.0.5].
mongo extension is already installed
php -i | grep mongo
/usr/local/etc/php/7.0/conf.d/ext-mongodb.ini
mongodb
mongodb support => enabled
mongodb version => 1.1.6
mongodb stability => stable
libmongoc version => 1.3.5
mongodb.debug => no value => no value
what went wrong in this case?
On PHP7 you have mongodb
extension as @xaben mentioned. You can use this with doctrine until it support mongodb
but by installing additional library https://github.com/alcaeus/mongo-php-adapter
First install via composer:
composer require alcaeus/mongo-php-adapter
and later install doctrine. It's works very well in my case.
PHP has 2 extensions for MongoDB:
In case of "doctrine/mongodb-odm" it expects to find the legacy one "mongo" but what you have installed is the newer one "mongodb".
In order to use the legacy extension you need to use php <= 5.6, for php 7 only mongodb is available.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With