2

I am facing issue in production which has mongodb.so extention where our Symfony 2 ODM bundle is using mongo.so.

And also as mentioned in following reference link mongo.so is deprecated hence we don't want to use mongo.so further.

http://php.net/manual/en/mongo.installation.php

Right now we are using following bundles, these are using mongo.so and not supporting mongodb.so.

"doctrine/mongodb-odm": "~1.0",
"doctrine/mongodb-odm-bundle": "~3.0"

Please suggest me right Doctirine ODM bundle which uses MongoDB.so extention.

Aravind Kumar Anugula
  • 1,304
  • 3
  • 14
  • 35

2 Answers2

1

ODM itself will not support new driver until 2.0 is released, at the moment you can use mongo-php-adapter which implements ext-mongo's API atop ext-mongodb and mongo-php-library. For more informations you may want to see ODM's last release blogpost.

malarzm
  • 2,831
  • 2
  • 15
  • 25
0

You need to install high level driver adapter like alcaeus/mongo-php-adapter. In order to use Symfony with MongoDB you need:

  • Symfony 3 : obviously :-) ;
  • Symfony Doctrine MongoDB Bundle (doctrine/mongodb-odm-bundle): this bundle integrates the Doctrine2 MongoDB Object Document Mapper (ODM) library into Symfony;
  • Doctrine MongoDB Object Document Mapper (doctrine/mongodb-odm): library that provides a PHP object mapping functionality for MongoDB;
  • MongoDB Adapter (alcaeus/mongo-php-adapter): It provides the API of ext-mongo built on top of mongo-php-library, thus being compatible with PHP 7;
  • MongoDB driver library (mongodb/mongodb): provides a high-level abstraction around the lower-level drivers for PHP;
  • MongoDB PHP extension: low level driver extension for PHP and HHVM. Please pay attention on the MongoDB driver. Don’t use the legacy MongoDB driver (http://php.net/manual/en/book.mongo.php).

You can follow these instructions: How to install Symfony3 with MongoDB (and PHP7)