PHPackages                             maslosoft/mongofill - 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. maslosoft/mongofill

ActiveLibrary

maslosoft/mongofill
===================

Polyfill of PECL Mongo extension

0.0.3(10y ago)01.5k[1 PRs](https://github.com/Maslosoft/mongofill/pulls)MITPHP

Since Mar 3Pushed 9y ago1 watchersCompare

[ Source](https://github.com/Maslosoft/mongofill)[ Packagist](https://packagist.org/packages/maslosoft/mongofill)[ RSS](/packages/maslosoft-mongofill/feed)WikiDiscussions master Synced 2mo ago

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

Mongofill [![Build Status](https://camo.githubusercontent.com/0bbacc4bac9cf479ab1bfacb57f4f0269b9267d06045631410fa1354d1a5d1cf/68747470733a2f2f7365637572652e7472617669732d63692e6f72672f6d6f6e676f66696c6c2f6d6f6e676f66696c6c2e706e67)](http://travis-ci.org/mongofill/mongofill)
===================================================================================================================================================================================================================================================================================

[](#mongofill-)

Pure PHP implementation of MongoDB driver, with aim to be a drop-in replacement of the official extension, usable under HHVM runtime.

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

[](#installation)

### Recommended way

[](#recommended-way)

The recommended way of installing is through the [mongofill-hhvm](https://github.com/mongofill/mongofill-hhvm) package as HNI extension of HHVM

```
git clone https://github.com/mongofill/mongofill-hhvm
cd mongofill-hhvm
./build.sh
```

You can read the full instructions at [building-and-installation instructions](https://github.com/mongofill/mongofill-hhvm#building-and-installation) from the HNI package.

### Easy way

[](#easy-way)

The easy way of installing Mongofill is [through composer](http://getcomposer.org). You can see [package information on Packagist.](https://packagist.org/packages/mongofill/mongofill)

```
{
    "require": {
        "mongofill/mongofill": "dev-master"
    }
}
```

> Note: as pure PHP, the phpversion('mongo') will return null and some libraries as Doctrine will not work properly [without modifications](https://github.com/mcuadros/mongodb-odm/commit/b89b21b8dca6a0b545a718f3805248453a27ec3d), so please use the HNI version.

Supported libraries
-------------------

[](#supported-libraries)

You can check the current supported libraries at wiki page [Supported-Libraries](https://github.com/koubas/mongofill/wiki/Supported-Libraries)

Community
---------

[](#community)

You can catch us on IRC on Freenode channel #mongofill

Contributing
------------

[](#contributing)

Please push tests, ensuring compatibility with the official Mongo extension, that are not passing yet, into the "compat/not-passing" branch.

Contributions are greatly appreciated, including corrections of our english ;)

To ensure a consistent code base, you should make sure the code follows the PSR2 coding standards. We suggest use php-cs-fixer with your code before make the pull request with this flags: `php-cs-fixer fix . --level=all`

### Running the PHPUnit tests

[](#running-the-phpunit-tests)

Tests are in the `test` folder. To run them, you need PHPUnit.

```
phpunit --configuration phpunit.xml.dist
```

### Running the native mongo-php-driver tests

[](#running-the-native-mongo-php-driver-tests)

You can find helper script at `test/native/helper.sh`. Your system must have installed: mongodb, git, phpize and autotools

```
cd tests/native/
./helper.sh setup
./helper.sh boot
./helper.sh run
```

Benchmarking
------------

[](#benchmarking)

A small suite of benchmarking is included with the package, you can run the suite with this command:

```
php ./vendor/bin/athletic -b tests/bootstrap.php  -p tests/Mongofill/Benchmarks/
```

Some results can be find at:

Caveats
-------

[](#caveats)

### Replica Sets &amp; APC

[](#replica-sets--apc)

When using a replica set, the Mongofill driver needs to fetch information about the replica set configuration and status. To improve performance, the driver will attempt to use APC (apc\_fetch, apc\_store) to cache replica set data.

The APC functions should be automatically installed with HHVM, but if you plan on using the Mongofill driver with PHP, you'll need to make sure APC is installed if you want the performance boost.

For PHP 5.5 and higher, this would be the APCu extension. If APC is not installed, replica sets will still function, they just won't be as fast.

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 52.1% 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 ~17 days

Total

3

Last Release

3718d ago

### Community

Maintainers

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

---

Top Contributors

[![mcuadros](https://avatars.githubusercontent.com/u/1573114?v=4)](https://github.com/mcuadros "mcuadros (112 commits)")[![koubas](https://avatars.githubusercontent.com/u/1354930?v=4)](https://github.com/koubas "koubas (36 commits)")[![dylanwenzlau](https://avatars.githubusercontent.com/u/4359148?v=4)](https://github.com/dylanwenzlau "dylanwenzlau (17 commits)")[![Pomyk](https://avatars.githubusercontent.com/u/156784?v=4)](https://github.com/Pomyk "Pomyk (12 commits)")[![pmaselkowski](https://avatars.githubusercontent.com/u/520283?v=4)](https://github.com/pmaselkowski "pmaselkowski (9 commits)")[![thawkins](https://avatars.githubusercontent.com/u/14537?v=4)](https://github.com/thawkins "thawkins (3 commits)")[![endeveit](https://avatars.githubusercontent.com/u/197781?v=4)](https://github.com/endeveit "endeveit (3 commits)")[![nantunes](https://avatars.githubusercontent.com/u/209365?v=4)](https://github.com/nantunes "nantunes (3 commits)")[![rexxars](https://avatars.githubusercontent.com/u/48200?v=4)](https://github.com/rexxars "rexxars (2 commits)")[![nbas11](https://avatars.githubusercontent.com/u/454696?v=4)](https://github.com/nbas11 "nbas11 (2 commits)")[![Kozzi11](https://avatars.githubusercontent.com/u/1239642?v=4)](https://github.com/Kozzi11 "Kozzi11 (2 commits)")[![nigelterry](https://avatars.githubusercontent.com/u/1019674?v=4)](https://github.com/nigelterry "nigelterry (1 commits)")[![rybakit](https://avatars.githubusercontent.com/u/533861?v=4)](https://github.com/rybakit "rybakit (1 commits)")[![alex-cc](https://avatars.githubusercontent.com/u/34760446?v=4)](https://github.com/alex-cc "alex-cc (1 commits)")[![tstobbe](https://avatars.githubusercontent.com/u/847910?v=4)](https://github.com/tstobbe "tstobbe (1 commits)")[![arthurdarcet](https://avatars.githubusercontent.com/u/973454?v=4)](https://github.com/arthurdarcet "arthurdarcet (1 commits)")[![EmmanuelVella](https://avatars.githubusercontent.com/u/663607?v=4)](https://github.com/EmmanuelVella "EmmanuelVella (1 commits)")[![h4cc](https://avatars.githubusercontent.com/u/2981491?v=4)](https://github.com/h4cc "h4cc (1 commits)")[![holtkamp](https://avatars.githubusercontent.com/u/776405?v=4)](https://github.com/holtkamp "holtkamp (1 commits)")[![iamdaniele](https://avatars.githubusercontent.com/u/208292?v=4)](https://github.com/iamdaniele "iamdaniele (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/maslosoft-mongofill/health.svg)

```
[![Health](https://phpackages.com/badges/maslosoft-mongofill/health.svg)](https://phpackages.com/packages/maslosoft-mongofill)
```

PHPackages © 2026

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