PHPackages                             pvodicka/mongo-php-library - 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. pvodicka/mongo-php-library

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

pvodicka/mongo-php-library
==========================

MongoDB PHP library ( modified to use static property for selected server )

1.2.2(8y ago)01.4k1Apache-2.0PHPPHP &gt;=5.5

Since Dec 12Pushed 8y ago1 watchersCompare

[ Source](https://github.com/pvodicka/mongo-php-library)[ Packagist](https://packagist.org/packages/pvodicka/mongo-php-library)[ Docs](https://jira.mongodb.org/browse/PHPLIB)[ RSS](/packages/pvodicka-mongo-php-library/feed)WikiDiscussions master Synced 5d ago

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

Modified to use static server property for selected server to override subsequent server selection during same script execution. Not recomended for production enviroment!

MongoDB library for PHP
=======================

[](#mongodb-library-for-php)

This library provides a high-level abstraction around the lower-level drivers for [PHP](https://github.com/mongodb/mongo-php-driver) and [HHVM](https://github.com/mongodb/mongo-hhvm-driver) (i.e. the `mongodb`extension).

While the extension provides a limited API for executing commands, queries, and write operations, this library implements an API similar to that of the [legacy PHP driver](http://php.net/manual/en/book.mongo.php). It contains abstractions for client, database, and collection objects, and provides methods for CRUD operations and common commands (e.g. index and collection management).

If you are developing an application with MongoDB, you should consider using this library, or another high-level abstraction, instead of the extension alone.

For further information about the architecture of this library and the `mongodb`extension, see:

-

Documentation
-------------

[](#documentation)

-

Installation
============

[](#installation)

As a high-level abstraction for the driver, this library naturally requires that the [`mongodb` extension be installed](http://php.net/manual/en/mongodb.installation.php):

```
$ pecl install mongodb
$ echo "extension=mongodb.so" >> `php --ini | grep "Loaded Configuration" | sed -e "s|.*:\s*||"`

```

The preferred method of installing this library is with [Composer](https://getcomposer.org/) by running the following from your project root:

```
$ composer require mongodb/mongodb

```

Reporting Issues
----------------

[](#reporting-issues)

Please use the following form to report any issues:

- [https://jira.mongodb.org/secure/CreateIssue.jspa?pid=12483&amp;issuetype=1](https://jira.mongodb.org/secure/CreateIssue.jspa?pid=12483&issuetype=1)

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community22

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 84.9% 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 ~52 days

Recently: every ~11 days

Total

22

Last Release

3076d ago

Major Versions

0.2.0 → 1.0.0-alpha12015-10-07

PHP version history (2 changes)1.0.0-alpha1PHP &gt;=5.4

1.2.0PHP &gt;=5.5

### Community

Maintainers

![](https://www.gravatar.com/avatar/56094a80325a6b76cf5a1fdbb511233ca5e0c5602301ff24fe53ce1b2cc260aa?d=identicon)[pvodicka](/maintainers/pvodicka)

---

Top Contributors

[![jmikola](https://avatars.githubusercontent.com/u/244663?v=4)](https://github.com/jmikola "jmikola (738 commits)")[![bjori](https://avatars.githubusercontent.com/u/72407?v=4)](https://github.com/bjori "bjori (66 commits)")[![kvwalker](https://avatars.githubusercontent.com/u/7121013?v=4)](https://github.com/kvwalker "kvwalker (22 commits)")[![derickr](https://avatars.githubusercontent.com/u/208074?v=4)](https://github.com/derickr "derickr (9 commits)")[![pvodicka](https://avatars.githubusercontent.com/u/4243219?v=4)](https://github.com/pvodicka "pvodicka (5 commits)")[![schmalliso](https://avatars.githubusercontent.com/u/1724699?v=4)](https://github.com/schmalliso "schmalliso (4 commits)")[![alcaeus](https://avatars.githubusercontent.com/u/383198?v=4)](https://github.com/alcaeus "alcaeus (3 commits)")[![mlaopane](https://avatars.githubusercontent.com/u/23735276?v=4)](https://github.com/mlaopane "mlaopane (3 commits)")[![tuyakhov](https://avatars.githubusercontent.com/u/7713205?v=4)](https://github.com/tuyakhov "tuyakhov (2 commits)")[![corpsee](https://avatars.githubusercontent.com/u/1416706?v=4)](https://github.com/corpsee "corpsee (2 commits)")[![remicollet](https://avatars.githubusercontent.com/u/270445?v=4)](https://github.com/remicollet "remicollet (1 commits)")[![scragglebug](https://avatars.githubusercontent.com/u/175835415?v=4)](https://github.com/scragglebug "scragglebug (1 commits)")[![serebro](https://avatars.githubusercontent.com/u/411724?v=4)](https://github.com/serebro "serebro (1 commits)")[![smottt](https://avatars.githubusercontent.com/u/619917?v=4)](https://github.com/smottt "smottt (1 commits)")[![abellion](https://avatars.githubusercontent.com/u/9916488?v=4)](https://github.com/abellion "abellion (1 commits)")[![villfa](https://avatars.githubusercontent.com/u/2891564?v=4)](https://github.com/villfa "villfa (1 commits)")[![Algatux](https://avatars.githubusercontent.com/u/888864?v=4)](https://github.com/Algatux "Algatux (1 commits)")[![carusogabriel](https://avatars.githubusercontent.com/u/16328050?v=4)](https://github.com/carusogabriel "carusogabriel (1 commits)")[![doublecompile](https://avatars.githubusercontent.com/u/4267230?v=4)](https://github.com/doublecompile "doublecompile (1 commits)")[![gmsantos](https://avatars.githubusercontent.com/u/1991286?v=4)](https://github.com/gmsantos "gmsantos (1 commits)")

---

Tags

persistencedatabasemongodbdriver

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/pvodicka-mongo-php-library/health.svg)

```
[![Health](https://phpackages.com/badges/pvodicka-mongo-php-library/health.svg)](https://phpackages.com/packages/pvodicka-mongo-php-library)
```

###  Alternatives

[mongodb/mongodb

MongoDB driver library

1.6k64.0M546](/packages/mongodb-mongodb)[doctrine/doctrine-bundle

Symfony DoctrineBundle

4.8k241.3M3.3k](/packages/doctrine-doctrine-bundle)[mongodb/laravel-mongodb

A MongoDB based Eloquent model and Query builder for Laravel

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

MongoDB driver extension

91919.8k](/packages/mongodb-mongodb-extension)[doctrine/mongodb-odm-bundle

Symfony Doctrine MongoDB Bundle

38418.7M195](/packages/doctrine-mongodb-odm-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)
