PHPackages                             exs/simple-mongo-bundle - 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. exs/simple-mongo-bundle

ActiveSymfony-bundle[Database &amp; ORM](/categories/database)

exs/simple-mongo-bundle
=======================

Bundle for peresisting and retriving information from MongoDB in PHP7

v2.0.0(6y ago)01.2kMITPHPPHP &gt;=7.2CI failing

Since Aug 5Pushed 6y ago9 watchersCompare

[ Source](https://github.com/ExSituMarketing/EXS-SimpleMongoBundle)[ Packagist](https://packagist.org/packages/exs/simple-mongo-bundle)[ Docs](https://github.com/ExSituMarketing/EXS-SimpleMongoBundle)[ RSS](/packages/exs-simple-mongo-bundle/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (2)Versions (5)Used By (0)

EXS-SimpleMongoBundle
=====================

[](#exs-simplemongobundle)

A simple bundle to persist and execute queries on MongDB database for php7

Installing the # EXS-SimpleMongoBundle in a new Symfony2 project
----------------------------------------------------------------

[](#installing-the--exs-simplemongobundle-in-a-new-symfony2-project)

Edit composer.json file with # EXS-SimpleMongoBundle dependency:

```
//composer.json
//...
"require": {
    //other bundles
    "exs/simple-mongo-bundle": "^1.0"
},
```

Save the file and have composer update the project via the command line:

```
composer update exs/simple-mongo-bundle
```

Update the app/AppKernel.php

```
//app/AppKernel.php
//...
public function registerBundles()
{
    $bundles = array(
    //Other bundles
    new EXS\SimpleMongoBundle\EXSSimpleMongoBundle(),
);
```

Usage
-----

[](#usage)

Add your mongodb connection and dbname in the parameter file

```
    simple_mongo:
        connection: mongodb://localhost:27017
        dbname: YOUR_DB_NAME
```

Create the new collection(Optional)

```
app/console exs:create:collection COLLECTION_NAME(Requires) OPTIONS
// Options
app/console exs:create:collection -h
```

In your controller or service

```
// Insert data to mongodb
$entity = new YourEntity();
$entity->setPropertyValue(THE_VALUE);
.
.

$manager = $this->get('exs_simple_mongo.service'); // get the service
$manager->persist($entity);
$result = $manager->flush(COLLECTION_NAME); // the result will store the number of inserted entries or error message
if(!is_int($result) || $result == 0) {
    throwException($result);
}

// Update
$filter = ['product' => 6];
$manager->update($filter, $entity);
$result = $manager->flush(COLLECTION_NAME);

// Get data with query
$filter = ['product' => 6];
$option = ['projection' => ['_id' => 0]];

$manager = $this->get('exs_simple_mongo.service'); // get the service
$result = $manager->exeQuery($filter, $option, COLLECTION_NAME);
// $result will contain results in an array
```

#### Contributing

[](#contributing)

Anyone and everyone is welcome to contribute.

If you have any questions or suggestions please [let us know](http://www.ex-situ.com/).

###  Health Score

30

—

LowBetter than 62% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity61

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

Every ~550 days

Total

3

Last Release

2514d ago

Major Versions

v1.0.1 → v2.0.02019-08-12

PHP version history (2 changes)v1.0PHP &gt;=7.0

v2.0.0PHP &gt;=7.2

### Community

Maintainers

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

---

Top Contributors

[![slee1803](https://avatars.githubusercontent.com/u/10144066?v=4)](https://github.com/slee1803 "slee1803 (12 commits)")[![bear218](https://avatars.githubusercontent.com/u/48725585?v=4)](https://github.com/bear218 "bear218 (3 commits)")

---

Tags

phpbundlemongodbmongo

### Embed Badge

![Health badge](/badges/exs-simple-mongo-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/exs-simple-mongo-bundle/health.svg)](https://phpackages.com/packages/exs-simple-mongo-bundle)
```

###  Alternatives

[rcsofttech/audit-trail-bundle

Enterprise-grade, high-performance Symfony audit trail bundle. Automatically track Doctrine entity changes with split-phase architecture, multiple transports (HTTP, Queue, Doctrine), and sensitive data masking.

1175.2k](/packages/rcsofttech-audit-trail-bundle)[omines/datatables-bundle

Symfony DataTables Bundle with native Doctrine ORM, Elastica and MongoDB support

2841.5M6](/packages/omines-datatables-bundle)[denchikby/phalcon-mongodb-odm

Phalcon MongoDB ODM

4213.1k](/packages/denchikby-phalcon-mongodb-odm)[kucharovic/money-bundle

This bundle provides integration for Money library in your Symfony project.

2253.7k](/packages/kucharovic-money-bundle)

PHPackages © 2026

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