-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
will it compatible with new MongoDB library? #36
Comments
(The new MongoDB library is hosted here: https://github.com/mongodb/mongo-php-driver). Would be great if a newer version of Monga would be compatible with it. |
As far as I can see this codebase is pretty much dependant on old implementation of driver (type hinting). One of possible solutions would be to use interfaces for hints, but since we're looking at driver dependency - this doesn't seem as a viable solution to me. In the meantime I've forked the project it and intend to rewrite it for new driver. However, I don't know how soon will I manage to do that, but I'll be more than happy to help out / merge it back in to monga, or give @thephpleague rights over the repo. |
I've done some work on my fork, but there's so many things that have changed in drivers.
So, for my projects I've decided to drop monga and use native driver instead. I don't know when will I continue my work on porting Monga, or if I will ever complete it. |
Sorry for the late response, as y'all may know, it gets a little crazy around this time of year for the folks in the states, amongst other places. @shahmanthan9 @phofmann-trust Personally, I don't have any immediate plans to do this... but I can see myself following through with this within the next couple months here. @kornrunner I appreciate you looking into it. Please keep us updated with anything you may find if you revisit things in the future. If your interest is revived, I can certainly create a new branch for you to target. Let me know. |
@kornrunner I believe you can use the third connection parameter to tell the new driver to unserialize to arrays as default: /* This example instructs the library to unserialize root and embedded BSON
* documents as PHP arrays, like the legacy driver (i.e. ext-mongo). */
$client = new MongoDB\Client(null, [], [
'typeMap' => ['root' => 'array', 'document' => 'array'],
); @bcrowe however inconvenient it might be, we must use the new driver to operate with PHP7. Not sure about the compatibility of the current driver with MongoDB 3.0. For me, the show stopper is that mongodb/mongodb doesn't have support for GridFS, but I guess the underlying driver must support it. In other case, then no one should move to the new driver yet. |
@amenadiel I'm using the current (=old) driver with MongoDB 3.x. Works fine for me. |
So what exactly is the status of this? All I get is a "MongoClient not found" error. I'm on PHP 7.0.4 |
How to work with MongDB new driver |
In one of my projects I successfully use https://github.com/alcaeus/mongo-php-adapter. Have not tried it together with league/monga though. |
How can i use in monga...plz help me..i am using ur code...in my cakephp
project plz update or suggest me how to do that...i will owe for u
On 16 Mar 2017 8:55 pm, "Pascal Hofmann" <[email protected]> wrote:
In one of my projects I successfully use https://github.com/alcaeus/
mongo-php-adapter. Have not tried it together with league/monga though.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#36 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AD5AOmnxjATFn4BkErF1a8ocmrvwdyHMks5rmVSFgaJpZM4G0hv0>
.
|
Plz try with monga so will not impact on my existing project
…On 16 Mar 2017 10:13 pm, "basant kumar" ***@***.***> wrote:
How can i use in monga...plz help me..i am using ur code...in my cakephp
project plz update or suggest me how to do that...i will owe for u
On 16 Mar 2017 8:55 pm, "Pascal Hofmann" ***@***.***> wrote:
In one of my projects I successfully use https://github.com/alcaeus/mon
go-php-adapter. Have not tried it together with league/monga though.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#36 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AD5AOmnxjATFn4BkErF1a8ocmrvwdyHMks5rmVSFgaJpZM4G0hv0>
.
|
Hey all. Sorry, I've been running in maintenance-mode as of recent, but seeing as more and more people really want to see this out the door -- I can try to get something out by the weekend. @basantk As far as using this library in the context of Cake, you can either use this library directly, or trying writing your own datasource utilizing this library. https://github.com/cakephp/elastic-search is a good example of writing your own NoSQL-type datasource for Cake. |
@bcrowe Any luck working on refactoring for the new MongoDB driver in PHP 7? Or is this something you think will never happen? I love using Monga and would like to adapt the REST framework I've developed over the last few years for use with PHP 7, but this is a blocker since I depend on Monga for interacting with MongoDB data sources. |
@opengeek Yeah, I don't think this'll be happening any time soon (from my own efforts) as I've strayed away from Mongo a bit. Perhaps we can raise the signals to see if anyone is interested in adopting this and taking this on. |
I'm looking for something new to start into...so I'll take a look into this and see if I can get it working with the new Mongo Client |
This is what I did after getting
Using the instructions using the alcaeus/mongo-php-adapter package: composer config "platform.ext-mongo" "1.6.16" && composer require alcaeus/mongo-php-adapter Now all seems to be working on PHP 7.2..Enjoy @bcrowe close |
Hi All, I am facing the same issue:
Below are my configuration: I tried @angelxmoreno solutions, but I think it is only works for php 7. When I tried this solution, it is returning AuthenticationException. Please help me in solving this issue. |
No description provided.
The text was updated successfully, but these errors were encountered: