PHPackages                             prooph/event-store-mongodb-adapter - 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. prooph/event-store-mongodb-adapter

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

prooph/event-store-mongodb-adapter
==================================

MongoDB Adapter for ProophEventStore

v3.0.1(7y ago)638.3k10BSD-3-ClausePHPPHP ^7.1

Since Aug 9Pushed 7y ago5 watchersCompare

[ Source](https://github.com/prooph/event-store-mongodb-adapter)[ Packagist](https://packagist.org/packages/prooph/event-store-mongodb-adapter)[ Docs](http://getprooph.org/)[ RSS](/packages/prooph-event-store-mongodb-adapter/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (12)Versions (17)Used By (0)

event-store-mongodb-adapter
===========================

[](#event-store-mongodb-adapter)

[![Build Status](https://camo.githubusercontent.com/84065c16d5a3b7687b3ebd21c17c4a40bc7647c3fad533e0de36d6bb0ed47430/68747470733a2f2f7472617669732d63692e6f72672f70726f6f70682f6576656e742d73746f72652d6d6f6e676f64622d616461707465722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/prooph/event-store-mongodb-adapter)[![Coverage Status](https://camo.githubusercontent.com/6d26043d4a176372f37c77752417a003e17b88e0c26ad5c7ebc2fcd5bfd41315/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f70726f6f70682f6576656e742d73746f72652d6d6f6e676f64622d616461707465722f62616467652e7376673f6272616e63683d6d617374657226736572766963653d676974687562)](https://coveralls.io/github/prooph/event-store-mongodb-adapter?branch=master)[![Gitter](https://camo.githubusercontent.com/abe08b740a4156153736f791393ec4da6619c4be73212e75769f52edacc0e2b5/68747470733a2f2f6261646765732e6769747465722e696d2f4a6f696e253230436861742e737667)](https://gitter.im/prooph/improoph)

MongoDB Adapter for [ProophEventStore](https://github.com/prooph/event-store)

\#CAUTION: The mongoDB adapter is **NOT** compatible With prooph/event-store v7. MongoDB has limited ACID support which is not compatible with the new features of prooph/event-store. MongoDB is a great choice for a read model database, but unfortunately it cannot be used as an event-store that requires transactions across documents (events). Codeliner has published a [Gist](https://gist.github.com/codeliner/14a8d98d53efafdd35e851d76e89cc94) that shows a custom implementation of a possible mongoDB event store supporting a subset of the v7 features in a very limited way. If you want to try to bring mongoDB back, please get in touch with us and we can discuss it!

**Support for the adapter will end at 31 December 2017.**

Requirements
------------

[](#requirements)

- MongoDB &gt;= 4.0
- MongoDB PHP Driver &gt;= 1.5.2

Transactions
------------

[](#transactions)

The transaction write concern for this adapter is `majority`.

The transaction read concern for this adapter is `snapshot`.

You can disable transactions for this adapter.

Considerations
--------------

[](#considerations)

This adapter does not use the MongoDB ObjectId for its primary key, instead a UUID (string) is used.

We recommend the AggregateStreamStrategy as the best strategy to use with this adapter.

Keep in mind that transaction safety works only for a replica set. Sharded cluster support is planned for MongoDB 4.2. Therefore it's not safe to use this adapter in a sharded cluster environment, as MongoDB can't guarantee transaction safety.

Stream can not be reset if iteration was started due the MongoDB cursor.

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity31

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 88.1% 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.

###  Release Activity

Cadence

Every ~74 days

Recently: every ~191 days

Total

16

Last Release

2822d ago

Major Versions

v0.1 → v1.02015-08-28

v1.0 → v2.0-beta.12015-10-21

v2.5.0 → v3.0.02018-08-16

PHP version history (3 changes)v0.1PHP &gt;=5.5

v2.3.0PHP ^5.5 || ^7.0

v3.0.0PHP ^7.1

### Community

Maintainers

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

---

Top Contributors

[![prolic](https://avatars.githubusercontent.com/u/394428?v=4)](https://github.com/prolic "prolic (119 commits)")[![sandrokeil](https://avatars.githubusercontent.com/u/3597436?v=4)](https://github.com/sandrokeil "sandrokeil (8 commits)")[![basz](https://avatars.githubusercontent.com/u/143068?v=4)](https://github.com/basz "basz (6 commits)")[![codeliner](https://avatars.githubusercontent.com/u/5131987?v=4)](https://github.com/codeliner "codeliner (1 commits)")[![jpkleemans](https://avatars.githubusercontent.com/u/5700014?v=4)](https://github.com/jpkleemans "jpkleemans (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/prooph-event-store-mongodb-adapter/health.svg)

```
[![Health](https://phpackages.com/badges/prooph-event-store-mongodb-adapter/health.svg)](https://phpackages.com/packages/prooph-event-store-mongodb-adapter)
```

###  Alternatives

[mongodb/laravel-mongodb

A MongoDB based Eloquent model and Query builder for Laravel

7.1k7.2M71](/packages/mongodb-laravel-mongodb)[doctrine/mongodb-odm

PHP Doctrine MongoDB Object Document Mapper (ODM) provides transparent persistence for PHP objects to MongoDB.

1.1k23.3M302](/packages/doctrine-mongodb-odm)[alcaeus/mongo-php-adapter

Adapter to provide ext-mongo interface on top of mongo-php-library

46412.3M73](/packages/alcaeus-mongo-php-adapter)[prooph/event-store

Event Store v8

5471.5M40](/packages/prooph-event-store)[prooph/pdo-event-store

Prooph PDO EventStore

1121.2M19](/packages/prooph-pdo-event-store)[prooph/event-store-doctrine-adapter

Doctrine Adapter for ProophEventStore

1356.8k4](/packages/prooph-event-store-doctrine-adapter)

PHPackages © 2026

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