patchlevel / rango
A high-performance reimplementation of the MongoDB PHP API on top of PostgreSQL JSONB
Requires
- php: ~8.3.0 || ~8.4.0 || ~8.5.0
- ext-pdo: *
Requires (Dev)
- ext-mongodb: ^2.1
- infection/infection: ^0.31.9
- mongodb/mongodb: ^2.1
- patchlevel/coding-standard: ^1.3.0
- phpat/phpat: ^0.12.0
- phpbench/phpbench: ^1.2.15
- phpstan/phpstan: ^2.1.32
- phpstan/phpstan-phpunit: ^2.0.8
- phpunit/phpunit: ^11.5.17
- symfony/var-dumper: ^6.4.0 || ^7.0.0 || ^8.0.0
This package is auto-updated.
Last update: 2026-06-15 14:17:53 UTC
README
Rango
Rango is a high-performance PHP library that reimplements the MongoDB PHP API on top of PostgreSQL using the
power of JSONB.
It provides a drop-in compatible API, allowing you to use familiar MongoDB-style operations while storing your data in a reliable PostgreSQL database. This is ideal for applications that want to leverage PostgreSQL's ACID compliance and ecosystem without giving up the flexible document-based development experience of MongoDB.
Features
- Drop-in MongoDB API with
Client,Database, andCollection - CRUD operations like
insertOne,find,updateMany, anddeleteOne - Rich query operators such as
$gt,$in,$or, and$elemMatch - Update operators like
$set,$inc,$push, and$rename - Projection and sorting with dot-notation support
- Aggregation pipelines with
$match,$group,$unwind, and$lookup - Bulk writes wrapped in a single transaction
- Index management backed by native PostgreSQL indexes
Installation
composer require patchlevel/rango
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.
