I'm really confused about installing mongodb in my symfony. I always get this error when the time I refresh my site and I don't know if MAMP is part of this error.
Attempted to load class "DoctrineMongoDBBundle" from namespace "Symfony\Bundle\MongoDBBundle"
In my composer.json. I already add these codes to that file of composer.json.
"doctrine/mongodb-odm": "^1.0",
"doctrine/mongodb-odm-bundle": "^3.0"
but when I update the composer using this composer update. I always get these errors. I don't which one do I need to fix. I already install mongodb.
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, 1.4.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, 1.4.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, 1.4.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, 1.4.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, 1.4.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, 1.4.0].
- doctrine/mongodb-odm 1.0.6 requires doctrine/mongodb ~1.2 -> satisfiable by doctrine/mongodb[1.2.0, 1.2.1, 1.2.2, 1.3.0, 1.4.0].
- doctrine/mongodb-odm 1.0.7 requires doctrine/mongodb ~1.2 -> satisfiable by doctrine/mongodb[1.2.0, 1.2.1, 1.2.2, 1.3.0, 1.4.0].
- doctrine/mongodb-odm 1.0.8 requires doctrine/mongodb ~1.2 -> satisfiable by doctrine/mongodb[1.2.0, 1.2.1, 1.2.2, 1.3.0, 1.4.0].
- doctrine/mongodb-odm 1.1.2 requires php ^5.6 || ^7.0 -> your PHP version (5.5.36) does not satisfy that requirement.
- doctrine/mongodb-odm 1.1.1 requires php ^5.6 || ^7.0 -> your PHP version (5.5.36) does not satisfy that requirement.
- doctrine/mongodb-odm 1.1.0 requires php ^5.6 || ^7.0 -> your PHP version (5.5.36) does not satisfy that requirement.
- doctrine/mongodb 1.4.0 requires php ^5.6 || ^7.0 -> your PHP version (5.5.36) does not satisfy that requirement.
- 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, 1.0.6, 1.0.7, 1.0.8, 1.1.0, 1.1.1, 1.1.2].
I add my file to MAMP in htdocs folder. Did I miss something about the setup of mongodb to MAMP? or Does the version of symfony matters on these errors?
The important part from composer's output is
doctrine/mongodb 1.3.0 requires ext-mongo ^1.5 -> the requested PHP extension mongo is missing from your system.
which tells you that ext-mongo
is missing from your system. Due to that ODM nor its bundle can't be installed thus the error you're seeing as class indeed doesn't exist. You can find ext-mongo
's installation guide here.