0

I was trying to install MongoDB doctrine bundle as written in here But when I ran the command

$ php bin/vendors install

It throws up the following error:

Fatal error: Call to undefined method

Doctrine\ODM\MongoDB\Configuration::setLoggerCallable()in

C:\wamp\www\Symfony\app\cache\dev\appDevDebugProjectContainer.php on line 245

I have followed the installation instructions to the word (which has not been much anyways...) and i have also double checked my installation... Is there something I am missing here?

Update : A similar problem is mentioned here, but even after following the answer there, i could not successfully configure DoctrineMongoDBBundle.

Community
  • 1
  • 1
kumarharsh
  • 18,961
  • 8
  • 72
  • 100

2 Answers2

0

The latest changes in the Doctrine MongoDB repo have introduces this problem. To stick to a version before this happened, add this line to deps.lock:

doctrine-mongodb 5ccb18231218ce92c9d72295f69bebfe172ef5fb
Elnur Abdurrakhimov
  • 44,533
  • 10
  • 148
  • 133
  • doesn't seem to work for me... btw, after a little more digging, i found a similar problem, refer to the updated question... – kumarharsh Dec 23 '11 at 21:50
  • These are two different problems, and you need to do what I wrote here as well as what I wrote in an answer to [that question](http://stackoverflow.com/questions/7985248/doctrinemongodbbundle-getting-a-fatal-error-in-symfony2). Don't forget to run `bin/vendors install` after you do these. – Elnur Abdurrakhimov Dec 23 '11 at 22:22
  • I was getting the above mentioned error on running the `bin/vendors install` command. The issue seems to have finally been resolved. Thanks for your time elnur. – kumarharsh Dec 24 '11 at 16:00
0

Well, finally I managed to solve it by adding this to the deps file:

[DoctrineMongoDBBundle]
    git=http://github.com/symfony/DoctrineMongoDBBundle.git
    target=/bundles/Symfony/Bundle/DoctrineMongoDBBundle
    version=origin/2.0

** note the

version=**origin**/2.0

which is different from the previously suggested simple

version=2.0.0 or something similar...

I have a hunch that this problem occurs only on Windows, I hope someone could kindly confirm this.

kumarharsh
  • 18,961
  • 8
  • 72
  • 100