PHPackages                             proophsoftware/mongo-read-event-store - 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. proophsoftware/mongo-read-event-store

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

proophsoftware/mongo-read-event-store
=====================================

Read-only MongoDB EventStore Implementation

216PHP

Since Mar 8Pushed 8y ago2 watchersCompare

[ Source](https://github.com/proophsoftware/mongo-read-event-store)[ Packagist](https://packagist.org/packages/proophsoftware/mongo-read-event-store)[ RSS](/packages/proophsoftware-mongo-read-event-store/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependenciesVersions (1)Used By (0)

prooph MongoDb read-only event-store
====================================

[](#prooph-mongodb-read-only-event-store)

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

[](#installation)

```
composer require proophsoftware/mongo-read-event-store
```

Purpose
-------

[](#purpose)

The package provides a read-only mongodb event-store that connects to a prooph/event-store v6 mongodb. Fetched events are upcasted on-the-fly so that they fit into the message format defined by prooph/common v4 and up. The read-only mongodb event-store can be used to migrate v6 mongodb event streams to prooph/event-store v7 event-streams using a stream-to-stream projection.

Furthermore, you can use the read-only mongodb event-store within the event-store-http-api project to read your v6 event streams via HTTP.

Limitations
-----------

[](#limitations)

With prooph/event-store v7 a new event stream position was introduced which is a sequence. This new position is addressed in the `EventStore::load` and `EventStore::loadReverse` methods, but a v6 stream does not have such a position. Therefor, we fall back to sort by `created_at` and use `$fromNumber - 1` as skip option. This emulates iterating an event stream but may return a different event order as they were recorded due to same timestamp.

### Event Store HTTP API

[](#event-store-http-api)

To use the read-only mongodb event store with the event-store-http-api you need to wrap it with the `DecoratedReadOnlyEventStore`ship with this package because the http api package requires a full event store implementation. This means that you cannot use write actions of the http api.

Indexing
--------

[](#indexing)

To efficiently sort events by `created_at` you should add an index to your stream collections:

```
$collection->createIndex([
    'created_at' => 1
], ['name' => 'prooph_rom_sort']);
```

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

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://www.gravatar.com/avatar/e14a3b6de25e60cb289c51b23c58ffd8c56b28053deb4a75d3b7ea6b7fa03809?d=identicon)[proophsoftware](/maintainers/proophsoftware)

### Embed Badge

![Health badge](/badges/proophsoftware-mongo-read-event-store/health.svg)

```
[![Health](https://phpackages.com/badges/proophsoftware-mongo-read-event-store/health.svg)](https://phpackages.com/packages/proophsoftware-mongo-read-event-store)
```

###  Alternatives

[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k116.5M113](/packages/jdorn-sql-formatter)[propel/propel1

Propel is an open-source Object-Relational Mapping (ORM) for PHP5.

8351.6M87](/packages/propel-propel1)[pgvector/pgvector

pgvector support for PHP

198628.3k10](/packages/pgvector-pgvector)

PHPackages © 2026

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