-
-
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
Remove Mongo from Phalcon #13697
Comments
What do You mean by removing Mongo? Remove direct "usage" of mongo in .zep and also remove ODM completely in 4.0 release? |
@ViltusVilks Remove the current driver (Mongo driver) that Phalcon uses to interact with Mongo because it has been deprecated. That will mean that the ODM will not work for a period of time until the new driver is introduced. If we can do this in one go that would be great. |
Huh, deprecated? What is this? https://pecl.php.net/package/mongodb I am working on dokerized Phalcon-ODM-only project to make slim, fast and scalable image. Without ODM project is dead :( |
@ViltusVilks It is the driver itself. Phalcon has been using this driver: http://php.net/manual/en/book.mongo.php and we need to change it to this driver |
It is a matter of time and resources really. We have not "removed" anything with regards to the Mongo functionality. If you have the first driver installed then it will work I think. I really don't know the changes that 7.2 brought in that aspect of PHP. Removing mongo functionality including the ODM in one release and reintroducing it properly tested and upgraded is the plan. It has not materialized yet since we have not finished the release - still in alpha |
Ah... this is old one driver! And everything works fine php7.2.13 + 3.4.2 on Alpine 3.8 :) Shortcut - base collection class which is replacing Mvc\Collection. (i am using in Models namespace) If that stuff can be "ported" to .zep ... on re-implemented /cleaned. |
I am using Phalcon MongoCollection and Client component to connect to
mongo. It works as a charm.
Phalcon version 3.4.1
Php 7.2
…On Thu, 3 Jan 2019, 5:39 pm Juris Zeltiņš, ***@***.***> wrote:
Ah... this is old one driver!
Just for information - I am using *incubator
<https://github.com/phalcon/incubator>* github project, which overrides
collection and uses new driver. I also utilize GridFS features.
And everything works fine php7.2.13 + 3.4.2 on Alpine 3.8 :)
Have You checked that?
Shortcut - base collection class which is replacing Mvc\Collection. (i am
using in Models namespace)
https://github.com/phalcon/incubator/blob/master/Library/Phalcon/Mvc/MongoCollection.php
If that stuff can be "ported" to .zep ... on re-implemented /cleaned.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#13697 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AYmiiZ3nAeuAWY4XuSFsuTCWr14IIRgjks5u_iQcgaJpZM4Zgsd8>
.
|
@ViltusVilks Yes that is the plan. To upgrade the driver and clean things up. Right now we don't have a lot of time so this is why I wrote we need to remove it and bring it back fresh. The "removal" will be temporary of course. We are not killing the component. |
@niden I thought we'd always had to use the incubator version and that was using the new driver (since php7.0?). I'm a complete mongo convert so this is kinda important to me. Very willing to take a look at this once I've got used to writing the tests etc. |
Yep, incubator is good and can be taken as an "example". FYI: Just tryied to convert simple ODM models/code for Phalcon4 by modifing incubator code, it does not work, because of strict-type on interfaces on return types :( Basically Phalcon4 should provide generic collection+manager with possibility to attach any backend adapter capable to handle Document store and query (incl. Solr, Elastic ...) |
@npfedwards More than welcome to give it a go i.e. have the incubator code completely tested and working with the new driver. Then we can relatively easily port it to zephir @ViltusVilks I agree. I came up with this issue when I was trying to align the interfaces between A brand new interface for a I envision this:
|
@niden Sure. I'll have a go making sure the current incubator code is tested (I've been using it for a while so I'm pretty sure it works ;)). And then given I want to expand my knowledge I'll have a go porting it to Zephir. I expect it to be a few week project for me but expect a pull request in a while. |
@npfedwards sounds like a plan. We have time so no worries. I need to figure out the |
Some news. Of cause you need do some code fixes like getSource() : string and etc typed returns for interface functions, but quering and save works fine :) CollectionInterface, propper return type
MongoCollecto@Incubator, do the same
|
@niden This is similar to what I was requesting as NFR [1] Its a great idea having |
Does anyone have any updates on this? |
@SidRoberts From what I mentioned in a comment above, the storage adapters and the structure is there in the PSR-16 branch (my fork). Once that gets merged into 4.0.x we will have the structure to implement a mongo adapter using the latest driver. After that we can implement the Collection component that is aligned with the Resultset one. There were a couple of members of the community that have been working on setting up the mongo collection with the latest mongo driver offering better compatibility with the latest and greatest mongo functionality. Honestly I don't know about the timing on this i.e. whether we will have time to replace the mongo driver. For v4 we just might remove it and introduce it to v4.1. I think we can do this but I have to check SemVer if we can do it in a med version. |
Hello, I propose a (temporary) implementation while waiting for the total rewriting of the collections with MongoDb / PHP7. There is probably still work to be done, and unit tests must be done. The goal is to offer support for the new MongoDb driver for corporate projects |
Since there is no support for the existing driver for PHP, we have to remove Mongo from this release.
There is a plan to re-introduce it in the future as a storage adapter and with that we can re-introduce the
Mvc\Collection
class or something similarThe text was updated successfully, but these errors were encountered: