PHPackages                             crodas/activemongo - 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. crodas/activemongo

ActiveLibrary[Database &amp; ORM](/categories/database)

crodas/activemongo
==================

Simple and efficient ActiveRecord data abstraction for MongoDB

1401.4k22[5 issues](https://github.com/crodas/ActiveMongo/issues)[3 PRs](https://github.com/crodas/ActiveMongo/pulls)PHP

Since Sep 11Pushed 13y ago9 watchersCompare

[ Source](https://github.com/crodas/ActiveMongo)[ Packagist](https://packagist.org/packages/crodas/activemongo)[ RSS](/packages/crodas-activemongo/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependenciesVersions (1)Used By (0)

```
Really simple Activedocument for MongoDB
----------------------------------------

MongoDB is a very powerful database, high performance and amicable. I wrote an article about it,

http://www.phpclasses.org/blog/post/118-Developing-scalable-PHP-applications-using-MongoDB.html

ActiveMongo, is a simple yet efficient MongoDB abstraction, following the Activedocument pattern. Visit http://crodas.org/activemongo.php for further details.

Comments, patches, bug reports are welcome to the blog post, my personal e-mail address, crodas@php.net

 What it does now:

- Handle MongoDB connection, connecting once when it is needed
- Define a Collection as a class
- Abstracts iteration over a dataset
- Efficient save() which creates or updates efficiently (using $unset, $set) a document
- Provides simple queries interface, but allows to get MongoCollection for complex queries in sub-classes
- Delete current object, Drop() table
- Support filtering per property
- Support for efficient updates on nested documents
- Support Hooks:
    - pre_save($operation, Array &$document): Right before to perform and insert or update
    - on_save(): When a document is created
    - on_update(): When a document is updated
    - on_iterate(): On iteration, when the cursor moves to the next document
- Support simple yet useful collection installation, useful to create indexes and shard keys.
- Efficient references to another document, and an efficient way to load it (with one query if possible)
- Dynamic References (AKA, save a query to execute later)

TODO:

- PHP Streams support for GridFS
- Tools for setup and manage a sharded environment
```

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity32

Limited adoption so far

Community20

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 91.6% of commits — single point of failure

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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/36463?v=4)[C](/maintainers/crodas)[@crodas](https://github.com/crodas)

---

Top Contributors

[![crodas](https://avatars.githubusercontent.com/u/36463?v=4)](https://github.com/crodas "crodas (120 commits)")[![dfa](https://avatars.githubusercontent.com/u/278978?v=4)](https://github.com/dfa "dfa (4 commits)")[![dragoonis](https://avatars.githubusercontent.com/u/146321?v=4)](https://github.com/dragoonis "dragoonis (3 commits)")[![ibolmo](https://avatars.githubusercontent.com/u/27246?v=4)](https://github.com/ibolmo "ibolmo (3 commits)")[![mtorromeo](https://avatars.githubusercontent.com/u/51503?v=4)](https://github.com/mtorromeo "mtorromeo (1 commits)")

### Embed Badge

![Health badge](/badges/crodas-activemongo/health.svg)

```
[![Health](https://phpackages.com/badges/crodas-activemongo/health.svg)](https://phpackages.com/packages/crodas-activemongo)
```

###  Alternatives

[doctrine/orm

Object-Relational-Mapper for PHP

10.2k285.3M6.2k](/packages/doctrine-orm)[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k115.1M102](/packages/jdorn-sql-formatter)[illuminate/database

The Illuminate Database package.

2.8k52.4M9.4k](/packages/illuminate-database)[mongodb/mongodb

MongoDB driver library

1.6k64.0M546](/packages/mongodb-mongodb)[ramsey/uuid-doctrine

Use ramsey/uuid as a Doctrine field type.

90340.3M211](/packages/ramsey-uuid-doctrine)[reliese/laravel

Reliese Components for Laravel Framework code generation.

1.7k3.4M16](/packages/reliese-laravel)

PHPackages © 2026

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