PHPackages                             prooph/snapshot-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/snapshot-mongodb-adapter

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

prooph/snapshot-mongodb-adapter
===============================

Snapshot MongoDB Adapter for ProophEventStore

v2.0.0(7y ago)427.3k5[1 issues](https://github.com/prooph/snapshot-mongodb-adapter/issues)BSD-3-ClausePHPPHP ^7.1

Since Oct 19Pushed 7y ago4 watchersCompare

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

READMEChangelog (7)Dependencies (11)Versions (9)Used By (0)

snapshot-mongodb-adapter
========================

[](#snapshot-mongodb-adapter)

MongoDB Adapter for the Snapshot Store

[![Build Status](https://camo.githubusercontent.com/207463bd37c58965fdef6209587f66e9a464e0dd0bb980fe915a4dc23ff2d317/68747470733a2f2f7472617669732d63692e6f72672f70726f6f70682f736e617073686f742d6d6f6e676f64622d616461707465722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/prooph/snapshot-mongodb-adapter)[![Coverage Status](https://camo.githubusercontent.com/8df0b5b50171503848f20f69f24c2c15d9445a1c14a789b46435e882f8faa63b/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f70726f6f70682f736e617073686f742d6d6f6e676f64622d616461707465722f62616467652e7376673f6272616e63683d6d617374657226736572766963653d676974687562)](https://coveralls.io/github/prooph/snapshot-mongodb-adapter?branch=master)[![Gitter](https://camo.githubusercontent.com/abe08b740a4156153736f791393ec4da6619c4be73212e75769f52edacc0e2b5/68747470733a2f2f6261646765732e6769747465722e696d2f4a6f696e253230436861742e737667)](https://gitter.im/prooph/improoph)

\#CAUTION: Support for the adapter will end at 31 December 2017. Use  instead!

Set Up
------

[](#set-up)

How to use the adapter is explained in the [prooph/event-store docs](https://github.com/prooph/event-store/blob/master/docs/snapshots.md).

Interop Factory
---------------

[](#interop-factory)

Some general notes about how to use interop factories shipped with prooph components can be found in the [event store docs](https://github.com/prooph/event-store/blob/master/docs/interop_factories.md). Use the [mongodb snapshot adapter factory](src/Container/MongoDbSnapshotAdapterFactory.php) to set up the adapter. If your IoC container supports callable factories you can register the factory under a service id of your choice and configure this service id as `$config['prooph']['snapshot_store']['adpater']['type'] = `.

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

[](#requirements)

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

Indexing
--------

[](#indexing)

For faster access to the snapshots, it's recommended to index the metadata.

For example:

```
    db.[your snapshot collection].files.createIndex({"metadata.aggregate_type": 1, "metadata.aggregate_id": 1, "metadata.last_version": -1});

```

or use `\Prooph\EventStore\Snapshot\Adapter\MongoDb\MongoDbSnapshotAdapter::createIndexes`

Support
-------

[](#support)

- Ask questions on [prooph-users](https://groups.google.com/forum/?hl=de#!forum/prooph) google group.
- File issues at .
- Say hello in the [prooph gitter](https://gitter.im/prooph/improoph) chat.

Contribute
----------

[](#contribute)

Please feel free to fork and extend existing or add new features and send a pull request with your changes! To establish a consistent code quality, please provide unit tests for all your changes and may adapt the documentation.

Dependencies
============

[](#dependencies)

Please refer to the project [composer.json](composer.json) for the list of dependencies.

License
-------

[](#license)

Released under the [New BSD License](LICENSE).

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance15

Infrequent updates — may be unmaintained

Popularity29

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 66.7% 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 ~172 days

Recently: every ~249 days

Total

7

Last Release

2824d ago

Major Versions

v1.3.0 → v2.0.02018-08-16

PHP version history (3 changes)v1.0-beta.1PHP &gt;=5.5

v1.3.0PHP ^5.5 || ^7.0

v2.0.0PHP ^7.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/b633be52465d4aa057f04a7dd7ae8e9bb8ad0245c029550252a95eec395f85f4?d=identicon)[prooph](/maintainers/prooph)

---

Top Contributors

[![prolic](https://avatars.githubusercontent.com/u/394428?v=4)](https://github.com/prolic "prolic (20 commits)")[![basz](https://avatars.githubusercontent.com/u/143068?v=4)](https://github.com/basz "basz (7 commits)")[![sandrokeil](https://avatars.githubusercontent.com/u/3597436?v=4)](https://github.com/sandrokeil "sandrokeil (3 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

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

```
[![Health](https://phpackages.com/badges/prooph-snapshot-mongodb-adapter/health.svg)](https://phpackages.com/packages/prooph-snapshot-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)[moloquent/moloquent

A MongoDB based Eloquent model and Query builder for Laravel (Moloquent)

120114.6k7](/packages/moloquent-moloquent)

PHPackages © 2026

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