PHPackages                             saxulum/saxulum-doctrine-mongodb-provider - 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. saxulum/saxulum-doctrine-mongodb-provider

Abandoned → [chubbyphp / chubbyphp-laminas-config-doctrine](/?search=chubbyphp%20%2F%20chubbyphp-laminas-config-doctrine)ArchivedLibrary[Database &amp; ORM](/categories/database)

saxulum/saxulum-doctrine-mongodb-provider
=========================================

Saxulum Doctrine MongoDB Provider

2.1.2(6y ago)6196.6k3[1 PRs](https://github.com/saxulum/saxulum-doctrine-mongodb-provider/pulls)1MITPHPPHP ~7.0|~5.6

Since Dec 18Pushed 6y ago1 watchersCompare

[ Source](https://github.com/saxulum/saxulum-doctrine-mongodb-provider)[ Packagist](https://packagist.org/packages/saxulum/saxulum-doctrine-mongodb-provider)[ RSS](/packages/saxulum-saxulum-doctrine-mongodb-provider/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (5)Dependencies (5)Versions (13)Used By (1)

saxulum-doctrine-mongodb-provider
=================================

[](#saxulum-doctrine-mongodb-provider)

**works with plain silex-php**

[![Build Status](https://camo.githubusercontent.com/b5c809cf6a4715cce74d5e86c9728f40b7973fb69c121bdeb7d4841c57926cbc/68747470733a2f2f6170692e7472617669732d63692e6f72672f736178756c756d2f736178756c756d2d646f637472696e652d6d6f6e676f64622d70726f76696465722e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/saxulum/saxulum-doctrine-mongodb-provider)[![Total Downloads](https://camo.githubusercontent.com/6475940cc3bbc4ab54888df259ca45f170334ae08e7af47233b33cdc45dbd9e7/68747470733a2f2f706f7365722e707567782e6f72672f736178756c756d2f736178756c756d2d646f637472696e652d6d6f6e676f64622d70726f76696465722f646f776e6c6f6164732e706e67)](https://packagist.org/packages/saxulum/saxulum-doctrine-mongodb-provider)[![Latest Stable Version](https://camo.githubusercontent.com/8c73db7e697f8046f1aa8ec0260abd8e0aa70c0bfd46eb823c45c5b9ad9d5f28/68747470733a2f2f706f7365722e707567782e6f72672f736178756c756d2f736178756c756d2d646f637472696e652d6d6f6e676f64622d70726f76696465722f762f737461626c652e706e67)](https://packagist.org/packages/saxulum/saxulum-doctrine-mongodb-provider)

Features
--------

[](#features)

- Support for mongodb within [Silex](http://silex.sensiolabs.org/) or [Cilex](http://cilex.github.io/), it does NOT PROVIDE the [ODM](http://docs.doctrine-project.org/projects/doctrine-mongodb-odm/en/latest/) integration

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

[](#requirements)

- PHP 5.6+
- Doctrine Mongodb 1.0 Beta+

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

[](#installation)

Through [Composer](http://getcomposer.org) as [saxulum/saxulum-doctrine-mongodb-provider](https://packagist.org/packages/saxulum/saxulum-doctrine-mongodb-provider).

Example for one connection:

```
$app->register(new DoctrineMongoDbProvider(), array(
    'mongodb.options' => array(
        'server' => 'mongodb://localhost:27017',
        'options' => array(
            'username' => 'root',
            'password' => 'root',
            'db' => 'admin'
        )
    )
));

```

Example for one connection with custom ca file:

```
$app->register(new DoctrineMongoDbProvider(), array(
    'mongodb.options' => array(
        'server' => 'mongodb://localhost:27017',
        'options' => array(
            'username' => 'root',
            'password' => 'root',
            'db' => 'admin'
        ),
        'driverOptions => array(
            'ca_file' => '/some/ca.pem'
        )
    )
));

```

Example for multiple connections:

```
$app->register(new DoctrineMongoDbProvider(), array(
    'mongodbs.options' => array(
        'mongo1' => array(
            'server' => 'mongodb://localhost:27017',
            'options' => array(
                'username' => 'root',
                'password' => 'root',
                'db' => 'admin'
            )
        ),
        'mongo2' => array(
            'server' => 'mongodb://localhost:27018',
            'options' => array(
                'username' => 'root',
                'password' => 'root',
                'db' => 'admin'
            )
        )
    )
));

```

Usage
-----

[](#usage)

Example for one connection:

```
$document = array('key' => 'value');

$app['mongodb']
    ->selectDatabase('saxulum-doctrine-mongodb-provider')
    ->selectCollection('sample')
    ->insert($document)
;

```

Example for multiple connections:

```
$document = array('key' => 'value');

$app['mongodbs']['mongo1']
    ->selectDatabase('saxulum-doctrine-mongodb-provider')
    ->selectCollection('sample')
    ->insert($document)
;

```

Copyright
---------

[](#copyright)

- Dominik Zogg
- Fabien Potencier  ([DoctrineServiceProvider](http://silex.sensiolabs.org/doc/providers/doctrine.html), Logger)
- Kris Wallsmith  (Logger)

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity37

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 91.5% 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 ~180 days

Recently: every ~256 days

Total

12

Last Release

2541d ago

Major Versions

1.0.4 → 2.0.02014-10-04

v1.x-dev → 2.0.12016-08-05

PHP version history (3 changes)1.0.0PHP &gt;=5.3.3

1.0.5PHP ~7.0|~5.3

2.1.1PHP ~7.0|~5.6

### Community

Maintainers

![](https://www.gravatar.com/avatar/55048de83ca5e5d8c67164a19c78edcaad413b0c1a4ae10d92edf8d77bedd90f?d=identicon)[dominikzogg](/maintainers/dominikzogg)

---

Top Contributors

[![dominikzogg](https://avatars.githubusercontent.com/u/1011217?v=4)](https://github.com/dominikzogg "dominikzogg (54 commits)")[![sawmurai](https://avatars.githubusercontent.com/u/6454986?v=4)](https://github.com/sawmurai "sawmurai (3 commits)")[![TiMESPLiNTER](https://avatars.githubusercontent.com/u/598854?v=4)](https://github.com/TiMESPLiNTER "TiMESPLiNTER (2 commits)")

---

Tags

doctrinemongodbsilexmongopimplecilexsaxulum

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/saxulum-saxulum-doctrine-mongodb-provider/health.svg)

```
[![Health](https://phpackages.com/badges/saxulum-saxulum-doctrine-mongodb-provider/health.svg)](https://phpackages.com/packages/saxulum-saxulum-doctrine-mongodb-provider)
```

###  Alternatives

[dflydev/doctrine-orm-service-provider

Doctrine ORM Service Provider

2081.7M35](/packages/dflydev-doctrine-orm-service-provider)[mmucklo/queue-bundle

Symfony2/3/4/5 Queue Bundle (for background jobs) supporting Mongo (Doctrine ODM), Mysql (and any Doctrine ORM), RabbitMQ, Beanstalkd, Redis, and ... {write your own}

120839.8k](/packages/mmucklo-queue-bundle)[moriony/silex-mongo-provider

Mongo service provider for the Silex framwork.

118.5k](/packages/moriony-silex-mongo-provider)

PHPackages © 2026

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