PHPackages                             lexpress/mongodb-service-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. lexpress/mongodb-service-provider

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

lexpress/mongodb-service-provider
=================================

Silex Service Provider for MongoDB extension

v1.0.0(12y ago)7463MITPHP

Since Feb 13Pushed 11y ago6 watchersCompare

[ Source](https://github.com/LExpress/MongoDBServiceProvider)[ Packagist](https://packagist.org/packages/lexpress/mongodb-service-provider)[ RSS](/packages/lexpress-mongodb-service-provider/feed)WikiDiscussions master Synced today

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

LExpress / MongoDBServiceProvider
=================================

[](#lexpress--mongodbserviceprovider)

Parameters
----------

[](#parameters)

- **mongodb.server**: (optional) Server to connect.
    Example: `'mongodb.server' => 'mongodb://127.0.0.1:27017,127.0.0.1:27018'`
- **mongodb.options**: Array of [MongoDB options](http://www.php.net/manual/en/mongoclient.construct.php)
- **db**: DB name (required)
- **username**: Authentication user
- **password**: Authentication password
- **replicaSet**: ReplicaSet name

Services
--------

[](#services)

- **mongodb**: Instance of [`MongoDB`](http://www.php.net/manual/en/class.mongodb.php)

Using multiple connections
--------------------------

[](#using-multiple-connections)

You can use many MongoDB connections by registering the service provider multiple times with a different prefix passed to the constructor.

```
use LExpress\Silex\MongoDBServiceProvider;

$app->register(new MongoDBServiceProvider('mongodb.db1'), array(
    'mongodb.db1.options' => array(
        'db' => 'articles',
        'replicaSet' => 'rs1',
    ),
));

$app->register(new MongoDBServiceProvider('mongodb.db2'), array(
    'mongodb.db2.options' => array(
        'db' => 'users',
        'username' => 'bar',
        'password' => 'secret',
    ),
));
```

That will register 2 services: `mongodb.db1` and `mongodb.db2`.

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 80% 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

Unknown

Total

1

Last Release

4471d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/400034?v=4)[Jérôme Tamarelle](/maintainers/GromNaN)[@GromNaN](https://github.com/GromNaN)

![](https://www.gravatar.com/avatar/57fabcfbe3c772be6acc02eb7117d6e0c003a75bc25cc42535412db4e11902cf?d=identicon)[j0k3r](/maintainers/j0k3r)

---

Top Contributors

[![GromNaN](https://avatars.githubusercontent.com/u/400034?v=4)](https://github.com/GromNaN "GromNaN (4 commits)")[![ArnaudLigny](https://avatars.githubusercontent.com/u/80580?v=4)](https://github.com/ArnaudLigny "ArnaudLigny (1 commits)")

### Embed Badge

![Health badge](/badges/lexpress-mongodb-service-provider/health.svg)

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

###  Alternatives

[csanquer/pdo-service-provider

a PDO database service provider for silex

19199.0k](/packages/csanquer-pdo-service-provider)[dbtlr/silex-doctrine-migrations

Doctrine migration service provider for Silex

1123.8k1](/packages/dbtlr-silex-doctrine-migrations)[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)
