PHPackages                             moriony/silex-mongo-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. moriony/silex-mongo-provider

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

moriony/silex-mongo-provider
============================

Mongo service provider for the Silex framwork.

1.2.2(12y ago)118.5k6[2 issues](https://github.com/moriony/silex-mongo-provider/issues)MITPHP

Since Jan 6Pushed 9y ago1 watchersCompare

[ Source](https://github.com/moriony/silex-mongo-provider)[ Packagist](https://packagist.org/packages/moriony/silex-mongo-provider)[ Docs](https://github.com/moriony/silex-mongo-provider)[ RSS](/packages/moriony-silex-mongo-provider/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (4)Versions (6)Used By (0)

silex-mongo-provider
====================

[](#silex-mongo-provider)

[![Build Status](https://camo.githubusercontent.com/fa4a57c7543fc222fdb88dc01150175222153e9014bfe20ca7195964545eef2f/68747470733a2f2f7472617669732d63692e6f72672f6d6f72696f6e792f73696c65782d6d6f6e676f2d70726f76696465722e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/moriony/silex-mongo-provider) [![Coverage Status](https://camo.githubusercontent.com/b69013983553f94578ff5dbf466b5785358704fa716aa9ef7c3af1a05a48e182/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6d6f72696f6e792f73696c65782d6d6f6e676f2d70726f76696465722f62616467652e706e673f6272616e63683d6d6173746572)](https://coveralls.io/r/moriony/silex-mongo-provider?branch=master) [![Dependency Status](https://camo.githubusercontent.com/d0484b0942f62ccb104a07fc8cbebf724165925f6654cf8ae7ff5718e0bb55cc/68747470733a2f2f7777772e76657273696f6e6579652e636f6d2f757365722f70726f6a656374732f3531393830333534653663623962303030323030623138382f62616467652e706e67)](https://www.versioneye.com/user/projects/51980354e6cb9b000200b188)

[Mongo](http://mongodb.org/) service provider for the [Silex](http://silex.sensiolabs.org/) framwork.

Install via composer
--------------------

[](#install-via-composer)

Add in your `composer.json` the require entry for this library.

```
{
    "require": {
        "moriony/silex-mongo-provider": "*"
    }
}
```

and run `composer install` (or `update`) to download all files.

Usage
-----

[](#usage)

### Service registration

[](#service-registration)

```
$app->register(new MongoServiceProvider, array(
    'mongo.connections' => array(
        'default' => array(
            'server' => "mongodb://localhost:27017",
            'options' => array("connect" => true)
        )
    ),
));
```

### Connections retrieving

[](#connections-retrieving)

```
$connections = $app['mongo'];
$defaultConnection = $connections['default'];
```

### Creating mongo connection via factory

[](#creating-mongo-connection-via-factory)

```
$mongoFactory = $app['mongo.factory'];
$customConnection = $mongoFactory("mongodb://localhost:27017", array("connect" => true));
```

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance16

Infrequent updates — may be unmaintained

Popularity28

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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 ~106 days

Total

5

Last Release

4454d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/fd9a799b87d152a1af81ff3093367b5d91771d6b9703ac9399730f1b14ebbedf?d=identicon)[moriony](/maintainers/moriony)

---

Top Contributors

[![moriony](https://avatars.githubusercontent.com/u/1702031?v=4)](https://github.com/moriony "moriony (34 commits)")

---

Tags

databasemongodbsilexmongo

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/moriony-silex-mongo-provider/health.svg)

```
[![Health](https://phpackages.com/badges/moriony-silex-mongo-provider/health.svg)](https://phpackages.com/packages/moriony-silex-mongo-provider)
```

###  Alternatives

[mongodb/laravel-mongodb

A MongoDB based Eloquent model and Query builder for Laravel

7.1k7.2M71](/packages/mongodb-laravel-mongodb)[moloquent/moloquent

A MongoDB based Eloquent model and Query builder for Laravel (Moloquent)

120114.6k7](/packages/moloquent-moloquent)

PHPackages © 2026

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