PHPackages                             twoh/twoh\_mongodb\_driver - 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. twoh/twoh\_mongodb\_driver

ActiveTypo3-cms-extension[Database &amp; ORM](/categories/database)

twoh/twoh\_mongodb\_driver
==========================

Extends TYPO3 to support MongoDB.

1.0.6(5mo ago)00GPL-2.0-or-laterPHPPHP &gt;=8.2 &lt;8.4CI passing

Since Dec 7Pushed 5mo agoCompare

[ Source](https://github.com/twohreichel/twoh_mongodb_driver)[ Packagist](https://packagist.org/packages/twoh/twoh_mongodb_driver)[ GitHub Sponsors](https://github.com/twohreichel)[ RSS](/packages/twoh-twoh-mongodb-driver/feed)WikiDiscussions main Synced 1mo ago

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

MongoDB Driver for TYPO3
========================

[](#mongodb-driver-for-typo3)

[![TYPO3 13](https://camo.githubusercontent.com/ff624ed071afbc7085dcd4f99f2358379f8284ba14ae6891eab075f69c55929f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5459504f332d31332e342d6f72616e67652e737667)](https://get.typo3.org/version/13)[![PHP](https://camo.githubusercontent.com/499f0cc8e4b7e9e76ba59db7d928c5d98c02e85bcb3bcc9cb5b53a68004ea225/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e322d2d382e332d626c75652e737667)](https://www.php.net/)[![License](https://camo.githubusercontent.com/d865d3f061b5bdb93940bfc940d9e431166c9a28b20e625622a9d77854d1e3c7/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d47504c2d2d322e302d2d6f722d2d6c617465722d677265656e2e737667)](https://www.gnu.org/licenses/gpl-2.0.html)[![Version](https://camo.githubusercontent.com/155d56b8fd82ee8305a78bf2d0686769cecd057fe991638ad733c403a8ce01df/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f56657273696f6e2d312e302e362d627269676874677265656e2e737667)](https://github.com/twohreichel/twoh_mongodb_driver/releases)[![MongoDB](https://camo.githubusercontent.com/33fc45791cea4f8f8bcd6a784d4ce684650fe582ad995688a2a23fbfdb0ba88d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4d6f6e676f44422d4472697665722d3437413234382e7376673f6c6f676f3d6d6f6e676f6462266c6f676f436f6c6f723d7768697465)](https://www.mongodb.com/)[![GitHub Issues](https://camo.githubusercontent.com/ec62a45d6b5b726599bae220373da3cab0af7f79d1b558311d699ae4603083e1/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f74776f687265696368656c2f74776f685f6d6f6e676f64625f647269766572)](https://github.com/twohreichel/twoh_mongodb_driver/issues)

> Extends TYPO3 to support MongoDB as a database backend.

---

📑 Table of Contents
-------------------

[](#-table-of-contents)

- [General Info](#general-info)
- [Getting Started](#getting-started)
    - [Prerequisites](#prerequisites)
    - [Installation](#installation)
    - [Configuration](#configuration)
- [Usage](#usage)
    - [Basic Usage](#basic-usage)
    - [Full Example](#full-example)
- [Charts](#charts)
- [Documentation](#documentation)
- [Support](#support)
- [Authors](#authors)
- [License](#license)

---

General Info
------------

[](#general-info)

This TYPO3 extension provides a MongoDB driver that allows you to connect and interact with MongoDB databases directly from your TYPO3 installation.

**Keywords:** `TYPO3` `extension` `MongoDB` `driver` `database`

---

Getting Started
---------------

[](#getting-started)

### Prerequisites

[](#prerequisites)

RequirementVersionPHP&gt;=8.2 &lt;8.4TYPO3^13.4MongoDB Library&gt;=1.17 &lt;2.0ext-mongodb&gt;=1.17### Installation

[](#installation)

1. Install the extension via Composer:

    ```
    composer require twoh/twoh_mongodb_driver
    ```
2. Activate the extension in the TYPO3 Extension Manager.

### Configuration

[](#configuration)

Add the driver connection settings to your `config/system/settings.php` or `config/system/additional.php`:

```
$GLOBALS['TYPO3_CONF_VARS']['DRIVER']['MongoDB'] = [
    'host'     => getenv('TOOL_DB_HOST'),
    'dbname'   => getenv('TOOL_DB_DATABASE'),
    'user'     => getenv('TOOL_DB_USERNAME'),
    'password' => getenv('TOOL_DB_PASSWORD'),
    'port'     => getenv('TOOL_DB_PORT'),
];
```

---

Usage
-----

[](#usage)

### Basic Usage

[](#basic-usage)

Access the ConnectionPool object to execute your queries:

**Namespace:** `TWOH\TwohMongodbDriver\Adapter\MongodbConnectionPoolAdapter`

```
$mongodbConnectionPoolAdapter = GeneralUtility::makeInstance(MongodbConnectionPoolAdapter::class);

$mongodbConnectionPoolAdapter->getConnectionPool()->selectDocuments(
    $collectionName,
    $filter,
    $options
);
```

### Full Example

[](#full-example)

The following example demonstrates how to query MongoDB and return the results to your view:

```
protected MongodbConnectionPoolAdapter $mongodbConnectionPoolAdapter;

public function __construct(
    protected MongodbConnectionPoolAdapter $mongodbConnectionPoolAdapter
) {
}

public function indexAction(
    ServerRequestInterface $request,
    ModuleTemplate $view
): ResponseInterface {
    $view->assignMultiple([
        'users' => $this->mongodbConnectionPoolAdapter->getConnectionPool()->selectDocuments(
            'user',
            [
                'uuid' => 'user1',
            ],
            [
                'limit' => 5,
                'projection' => [
                    'uuid' => 1,
                    'username' => 1,
                    'email' => 1,
                    'name' => 1,
                    'pageInteractions' => 1,
                ],
            ],
        )
    ]);

    return $view->renderResponse('AdminModule/Index');
}
```

---

Charts
------

[](#charts)

This extension integrates charts via [Chart.js](https://www.chartjs.org/docs/4.4.1/getting-started/usage.html).

---

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

[](#documentation)

📖 **[ConnectionPool Functions](Documentation/ConnectionPool.md)** – Detailed documentation of all available ConnectionPool methods.

📚 **[Official Documentation](https://docs.typo3.org/p/twoh/twoh_mongodb_driver/main/en-us/)** – Full documentation on docs.typo3.org.

---

Support
-------

[](#support)

- 🐛 **[Report Issues](https://github.com/twohreichel/twoh_mongodb_driver/issues)** – Found a bug? Let us know!
- 📦 **[Source Code](https://github.com/twohreichel/twoh_mongodb_driver)** – View the source on GitHub.
- 💖 **[Sponsor this Project](https://github.com/sponsors/twohreichel)** – Support development with a GitHub Sponsorship!

If you find this extension useful and want to support its continued development, please consider becoming a sponsor. Your support helps maintain and improve this project, add new features, and keep it compatible with the latest TYPO3 versions. Every contribution, no matter how small, makes a difference!

---

Authors
-------

[](#authors)

NameRoleContact**Andreas Reichel**Developer**Igor Smertin**Developer---

License
-------

[](#license)

This project is licensed under the **GPL-2.0-or-later** license. See the [LICENSE](LICENSE) file for details.

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance73

Regular maintenance activity

Popularity0

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~6 days

Total

3

Last Release

150d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/910be78d7e68cfd2c6a88273375162664dfa6a8c96478fd336be892744546c63?d=identicon)[twoh](/maintainers/twoh)

---

Top Contributors

[![twohreichel](https://avatars.githubusercontent.com/u/118019689?v=4)](https://github.com/twohreichel "twohreichel (5 commits)")[![IgorSchubwerk](https://avatars.githubusercontent.com/u/111863465?v=4)](https://github.com/IgorSchubwerk "IgorSchubwerk (4 commits)")[![igorSmertinSchubwerk](https://avatars.githubusercontent.com/u/93521471?v=4)](https://github.com/igorSmertinSchubwerk "igorSmertinSchubwerk (4 commits)")[![Copilot](https://avatars.githubusercontent.com/in/1143301?v=4)](https://github.com/Copilot "Copilot (2 commits)")[![arlschubwerk](https://avatars.githubusercontent.com/u/139746399?v=4)](https://github.com/arlschubwerk "arlschubwerk (1 commits)")

---

Tags

mongodbphp8typo3typo3-cms-extensiontypo3-extensionwebdevelopmentdatabasemongodbdriverextensiontypo3

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/twoh-twoh-mongodb-driver/health.svg)

```
[![Health](https://phpackages.com/badges/twoh-twoh-mongodb-driver/health.svg)](https://phpackages.com/packages/twoh-twoh-mongodb-driver)
```

###  Alternatives

[mongodb/laravel-mongodb

A MongoDB based Eloquent model and Query builder for Laravel

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

MongoDB driver library

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

MongoDB driver extension

91919.8k](/packages/mongodb-mongodb-extension)[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)
