PHPackages                             quangvule/yii2-mongodb - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. quangvule/yii2-mongodb

ActiveYii2-extension[Database &amp; ORM](/categories/database)

quangvule/yii2-mongodb
======================

MongoDb extension for the Yii framework

2.0.4(10y ago)07BSD-3-ClausePHP

Since Apr 13Pushed 9y ago1 watchersCompare

[ Source](https://github.com/quangvule/yii2-mongodb)[ Packagist](https://packagist.org/packages/quangvule/yii2-mongodb)[ RSS](/packages/quangvule-yii2-mongodb/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (1)Versions (8)Used By (0)

MongoDb Extension for Yii 2
===========================

[](#mongodb-extension-for-yii-2)

This extension provides the [MongoDB](http://www.mongodb.org/) integration for the [Yii framework 2.0](http://www.yiiframework.com).

For license information check the [LICENSE](LICENSE.md)-file.

Documentation is at [docs/guide/README.md](docs/guide/README.md).

[![Latest Stable Version](https://camo.githubusercontent.com/1e4b64f510518e5214cd6019c965719418935b8d273e9bcf2c184434e36b8b5f/68747470733a2f2f706f7365722e707567782e6f72672f796969736f66742f796969322d6d6f6e676f64622f762f737461626c652e706e67)](https://packagist.org/packages/yiisoft/yii2-mongodb)[![Total Downloads](https://camo.githubusercontent.com/fbb78cfc2ecd836afc5cb388d357546b77a0d8a0dcbeb6eb3e942e0f6986b934/68747470733a2f2f706f7365722e707567782e6f72672f796969736f66742f796969322d6d6f6e676f64622f646f776e6c6f6164732e706e67)](https://packagist.org/packages/yiisoft/yii2-mongodb)[![Build Status](https://camo.githubusercontent.com/e8a53fc359ddfb986aedb54b81d5292f3d0d15a652cad8d038c702865efe203a/68747470733a2f2f7472617669732d63692e6f72672f796969736f66742f796969322d6d6f6e676f64622e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/yiisoft/yii2-mongodb)

Installation
------------

[](#installation)

This extension requires [MongoDB PHP Extension](http://us1.php.net/manual/en/book.mongo.php) version 1.5.0 or higher.

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
php composer.phar require --prefer-dist yiisoft/yii2-mongodb

```

or add

```
"yiisoft/yii2-mongodb": "~2.0.0"

```

to the require section of your composer.json.

Configuration
-------------

[](#configuration)

To use this extension, simply add the following code in your application configuration:

```
return [
    //....
    'components' => [
        'mongodb' => [
            'class' => '\yii\mongodb\Connection',
            'dsn' => 'mongodb://developer:password@localhost:27017/mydatabase',
        ],
    ],
];
```

###  Health Score

30

—

LowBetter than 67% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community20

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~65 days

Recently: every ~52 days

Total

7

Last Release

3969d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0c89a98c544fca1cdf7bbefe91803e0d469466d7c43feb59d8063fcc3e11a75e?d=identicon)[quangvule](/maintainers/quangvule)

---

Top Contributors

[![qiangxue](https://avatars.githubusercontent.com/u/993322?v=4)](https://github.com/qiangxue "qiangxue (1913 commits)")[![cebe](https://avatars.githubusercontent.com/u/189796?v=4)](https://github.com/cebe "cebe (753 commits)")[![samdark](https://avatars.githubusercontent.com/u/47294?v=4)](https://github.com/samdark "samdark (641 commits)")[![klimov-paul](https://avatars.githubusercontent.com/u/1482054?v=4)](https://github.com/klimov-paul "klimov-paul (404 commits)")[![creocoder](https://avatars.githubusercontent.com/u/896494?v=4)](https://github.com/creocoder "creocoder (148 commits)")[![resurtm](https://avatars.githubusercontent.com/u/100198?v=4)](https://github.com/resurtm "resurtm (123 commits)")[![Ragazzo](https://avatars.githubusercontent.com/u/1748844?v=4)](https://github.com/Ragazzo "Ragazzo (76 commits)")[![lucianobaraglia](https://avatars.githubusercontent.com/u/374554?v=4)](https://github.com/lucianobaraglia "lucianobaraglia (44 commits)")[![suralc](https://avatars.githubusercontent.com/u/730039?v=4)](https://github.com/suralc "suralc (42 commits)")[![pmoust](https://avatars.githubusercontent.com/u/2493339?v=4)](https://github.com/pmoust "pmoust (36 commits)")[![schmunk42](https://avatars.githubusercontent.com/u/649031?v=4)](https://github.com/schmunk42 "schmunk42 (26 commits)")[![slavcodev](https://avatars.githubusercontent.com/u/757721?v=4)](https://github.com/slavcodev "slavcodev (20 commits)")[![LarryUllman](https://avatars.githubusercontent.com/u/1674823?v=4)](https://github.com/LarryUllman "LarryUllman (18 commits)")[![kartik-v](https://avatars.githubusercontent.com/u/3592619?v=4)](https://github.com/kartik-v "kartik-v (16 commits)")[![mohorev](https://avatars.githubusercontent.com/u/4974062?v=4)](https://github.com/mohorev "mohorev (13 commits)")[![tarasio](https://avatars.githubusercontent.com/u/1010578?v=4)](https://github.com/tarasio "tarasio (12 commits)")[![bwoester](https://avatars.githubusercontent.com/u/309565?v=4)](https://github.com/bwoester "bwoester (12 commits)")[![crtlib](https://avatars.githubusercontent.com/u/4428231?v=4)](https://github.com/crtlib "crtlib (12 commits)")[![gevik](https://avatars.githubusercontent.com/u/434535?v=4)](https://github.com/gevik "gevik (10 commits)")[![gonimar](https://avatars.githubusercontent.com/u/756571?v=4)](https://github.com/gonimar "gonimar (9 commits)")

---

Tags

mongodbyii2active-recordmongo

### Embed Badge

![Health badge](/badges/quangvule-yii2-mongodb/health.svg)

```
[![Health](https://phpackages.com/badges/quangvule-yii2-mongodb/health.svg)](https://phpackages.com/packages/quangvule-yii2-mongodb)
```

###  Alternatives

[yiisoft/yii2-mongodb

MongoDB extension for the Yii framework

3312.1M43](/packages/yiisoft-yii2-mongodb)[leroy-merlin-br/mongolid

Easy, powerful and ultrafast ODM for PHP and MongoDB.

11034.2k4](/packages/leroy-merlin-br-mongolid)[voskobovich/yii2-linker-behavior

This behavior makes it easy to maintain many-to-many and one-to-many relations in your ActiveRecord models.

80313.6k9](/packages/voskobovich-yii2-linker-behavior)[arogachev/yii2-tree

Database tree structures management for Yii 2 framework

222.0k](/packages/arogachev-yii2-tree)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
