alcaeus / mongo-php-adapter

:link: Adapter to provide ext-mongo interface on top of mongo-php-library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Mongo 1.3.0RC1 error

mmucklo opened this issue · comments

I'm seeing the following:

Attempted to call an undefined method named "isDefault" of class "MongoDB\Driver\WriteConcern" (after upgrading to the latest mongo driver on PHP 7.1).

Let me know if you need any more details (mongo-php-adapter is at the latest dev-master version).

Thanks for reporting, I'll take a look in the coming days!

@mmucklo I took a quick look. This looks interesting to say the least, but it's not a bug in mongo-php-adapter, but rather in mongo-php-library. In essence, mongodb/mongo-php-library#399 introduced these checks, but it also introduced a requirement on version 1.3.0 of the driver, so I'm not entirely sure why you're seeing an error. It'd probably be best to raise an issue against the MongoDB library, along with the current installed versions of mongo-php-driver and mongo-php-library.

commented

You can change mongodb version:
"mongodb/mongodb": "1.1.*"
and everything will work

@DarkDrim not sure how that relates to the problem at hand. Did you have the issue? If so, please let me know what versions of ext-mongodb, mongodb/mongodb and this adapter where used when the error appeared. Thanks.

commented

Hello! Yes, I had the same problem.
Solved it by updating mongo library.

I use the following versions (now there is no error)

"ext-mongo": "*", "alcaeus/mongo-php-adapter": "^1.1", "mongodb/mongodb": "1.1.*", "doctrine/mongodb-odm": "~1.0", "doctrine/mongodb-odm-bundle": "^3.3",

What version of mongodb/mongodb did you use before you upgraded to 1.1? If there is indeed a bug, please report an issue with MongoDB.

commented

Version 1.2.
I just wrote about a possible solution.
Perhaps someone else is looking for a solution to this problem

Cross-referencing mongodb/mongo-php-library#412, which is this issue report in the MongoDB PHP library. Please discuss possible solutions there, as this has nothing to do with the adapter.

Any updates?

There's nothing to update here, see the linked ticket instead. I would strongly guess this is due to ignore-platform-reqs when running composer update, which would pull in a library version that needs a newer driver version which isn't present.

@alcaeus Thank you. I went ahead and updated my OS to macOS High Sierra. And the drivers got updated. Its working now.