-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Any plan about support PHP MongoDB Driver? #11156
Comments
In general it is necessary to conduct laborious of refactoring. You'd be able to do it? :) |
+1 |
I don't think I can do that...Orz hope it can be made by someone. |
+1 |
@fizzka Can you please do PR? |
sorry, but I don't think I can do smtng good in zep =) |
+1 |
+1 |
+1 |
Hope +1 |
If i'm intersted to implement new driver, how can I do? |
Or someone already did this? |
I propose to do it first for Incubator. We will be able to evaluate his work and usefulness. Will be able to test and see thin places. Then we can port it to the Phalcon Core |
Im happy to look at putting in some time to this. Has anyone made a start anywhere? |
@tigerstrikemedia It seems to me nobody |
@sergeyklay looks like it's from scratch then ;) |
This is deeper than I thought. What sort of performance gains are we talking to essentially build a trimmed down version of the mongo PHP library eventually ported into zephir? Short of requiring that library which seems quite out of line with the phalcon system, that is what would be required to support the new MongoDB extension in the ODM system of phalcon. perhaps It would even be better at that stage to start on a full DB Adapter for MongoDB, it would seem that the majority of that sort of functionality is what mongo decided to strip out of the PHP extension. |
Yeah, indeed.
;) It seems to me, we have to use current stable Mongodb API. This is really important. Of course, it's actually more complicated than it seems at first glance. But due to the fact that Phalcon is PHP extension it make sense. And yes, implementation of this feature implies compliance current Phalcon API and BC |
Interface has minor differences, but pulling that interface into phalcon requires recreating the wheel as that is what mongo split out to a PHP library rather than keeping it in the extension. Seems a bit like fighting the tide to me, but I think that Phalcon has been a bit like that the whole way along. Ill pull what will essentially be a copy of the Mongo PHP library into a MongoDB Adapter in the incubator tonight / tomorrow and try to get a model adapter running from that. Does that make sense? |
Just added a pull request to the incubator. |
The travis builds are failing from code styling issues do you know of anywhere I can get a PHPStorm code style config for this? |
@tigerstrikemedia Because Phalcon incubator use PSR2 styles, so you can use this library to fix your styles code
|
We now have a very early version of the adapter (Phalcon\DB\Adapter\MongoDB) and collection (Phalcon\Mvc\MongoCollection) in the 2.1 branch of the incubator anyone who wants to test and let me know what breaks i'd be happy to work through any issues. |
+1 Hope for PHP7. |
+1 |
@belgrid it's already implemented in incubator. The code in core is for php 5, we can't make same class supporiting both php 5 and php 7 without some bad code. It's easier to have seperated class. |
+1 |
for Mongo <= 3.5 we can use an adapter (I use https://github.com/alcaeus/mongo-php-adapter) |
@cmeheut there is adapter in incubator already, not sure which exactly mongo versions it support. |
+1 |
+1 |
Closing in favor of #13855. Will revisit if the community votes for it, or in later versions. |
hi guys |
@fizzka There is already work underway by one of the members of the community to port the latest Mongo driver to the |
Implemented as separate package - https://github.com/phalcon/incubator-mongodb |
PHP PECL "mongo" is deprecated.
Ref: http://php.net/manual/en/book.mongo.php
The newer extension is PECL "mongodb"
Ref: http://php.net/manual/en/set.mongodb.php
Interfaces has huge differences.
The text was updated successfully, but these errors were encountered: