A lightweight Object Document Mapper for PHP that runs on both MongoDB and PostgreSQL with one consistent API

Maintainers

Package info

github.com/patchlevel/odm

Homepage

pkg:composer/patchlevel/odm

Statistics

Installs: 1 371

Dependents: 0

Suggesters: 0

Stars: 4

Open Issues: 1

1.0.0 2026-04-30 12:04 UTC

README

Mutation testing badge Latest Stable Version License

Patchlevel ODM

Patchlevel ODM is a lightweight Object Document Mapper (ODM) for PHP that works with MongoDB and PostgreSQL (via patchlevel/rango). It is built on top of our superfast patchlevel/hydrator, providing a simple attribute-based mapping layer and enterprise-grade features like cryptography.

Unlike Doctrine ODM, Patchlevel ODM has no Unit of Work. Repositories control persistence explicitly, so every write is deliberate and easy to reason about, which makes the library a good fit for long-running worker processes.

Features

Installation

composer require patchlevel/odm

Documentation

Integration

Contributing

We are open to contributions as long as they are in line with our BC-Policy.

Also note that the composer.lock is always generated with the newest supported PHP version as this is the version our tools run in the CI.