Mongo DB (document based databases)

guys, Lithium (aka li3),, recently created a mongodb adapter.

this is from the devs behind CakePHP up until 6 months ago.

Might be able to grab the li3 adapter and convert it for Yii


This looks really interesting - I hadn’t heard about this until I saw this post.

Are you guys thinking about an alternative of yiis implementation of ActiveRecord using MongoDB? Simply using MongoDB as an alternative to DAO seems very straightforward.

Edit: have you seen this


The goal is to do it Yii-style and use Yii models so validation and forms work.

@samdark - if you need any help then I’m happy to get involved and lend a hand in development.



Check If you’ll have some ideas or code to contribute, send me a message, I’ll add you to YiiExt.

Just wanted to chime in as someone looking for MongoDB support in Yii. I look forward to seeing what you come up with!

This is really good stuff! I’m looking forward to trying it out :)

Any updates to the MongoDB adapter? It appears it hasn’t been touched since March.

How is the stability and functionality?

No changes. Still not finished concept alpha.

MongoDB support would simply add huge value;

Looking forward to helping out in any testing.

  • Kefah.

What is functioning in the alpha, and what remains to be completed?

Nothing is functioned. It’s a concept that was not possible some versions ago because lack of dynamic validators support. Now Yii do have them but I don’t have time to invest in mongo support.

Do you have any code? maybe we can give this support…

Here it is: If you want to work on it, contact me.


I don’t have much free time, but I’d like to work on it.


So, what is best suited for yii in terms of MongoDB layer ?

PHP Net PECL extension


Doctrine MongoDB Object Document Mapper

Ok, the last one is in beta but Doctrine used us to good jobs and their approach can eventually be more interesting for yii. Follow the link for introduction

what is your opinion on this except some may tell that PECL should be faster ?

None of them since both are not integrated with Yii.

im looking for a mongo adapter too as I want to store all my logs as json entries… please let me know when an adapter exists! Thanks!!!

There is one here

Removed my post, I haven’t see the new status.