Install doctrine mongo bundle on php7 enviroments

I have recently made a new symfony project on php7 and I had a lot of problems installing mongo doctrine.

What I have tried:

  • Directly mention packages in composer.json and run composer update
  • Putting all new packages “@stable” version

None of the above worked, but I have found a very specific way that it worked and the order of the steps is very important:

php composer.phar require alcaeus/mongo-php-adapter
php composer.phar require doctrine/mongodb-odm-bundle

Leave a Reply