PHPackages                             stereoflo/dbal-clickhouse - 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. stereoflo/dbal-clickhouse

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

stereoflo/dbal-clickhouse
=========================

Doctrine DBAL driver for ClickHouse

v1.0.1(4y ago)08861MITPHPPHP ^7.4

Since Dec 3Pushed 4y ago1 watchersCompare

[ Source](https://github.com/StereoFlo/dbal-clickhouse)[ Packagist](https://packagist.org/packages/stereoflo/dbal-clickhouse)[ RSS](/packages/stereoflo-dbal-clickhouse/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (2)Dependencies (5)Versions (3)Used By (0)

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

[](#installation)

```
composer require stereoflo/dbal-clickhouse

```

Initialization
--------------

[](#initialization)

### Symfony

[](#symfony)

configure...

```
# .env
CLICKHOUSE_HOST=127.0.0.1
CLICKHOUSE_PORT=8123
CLICKHOUSE_USER=default
CLICKHOUSE_PASSWORD=

```

```
# config/packages/doctrine.yaml
doctrine:
    dbal:
        dbname:   default
        host:     '%env(resolve:CLICKHOUSE_HOST)%'
        port:     '%env(resolve:CLICKHOUSE_PORT)%'
        user:     '%env(resolve:CLICKHOUSE_USER)%'
        password: '%env(resolve:CLICKHOUSE_PASSWORD)%'
        driver_class: DBALClickHouse\Driver
        wrapper_class: DBALClickHouse\Connection
        options:
            enable_http_compression: 1
            max_execution_time: 60
```

...and get from the service container

```
    private Connection $connection;

    public function __construct(Connection $connection)
    {
        $this->connection = $connection;
    }

    /**
     * @return array
     */
    public function getByUserId(int $userId): array
    {
        $result = $this->connection
            ->createQueryBuilder()
            ->select('user.user_id')
            ->from('users', 'user')
            ->where('user.user_id = :user_id')
            ->setParameter('user_id', $userId)
            ->executeQuery();

        return $result->fetchAllAssociative();
``
```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

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

Total

2

Last Release

1617d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2e0e71b332659d017bb7b91bb2c83556d68494a3531f8d5478e4be53b6336efe?d=identicon)[StereoFlo](/maintainers/StereoFlo)

---

Top Contributors

[![StereoFlo](https://avatars.githubusercontent.com/u/3583643?v=4)](https://github.com/StereoFlo "StereoFlo (13 commits)")

---

Tags

clickhousedbalsymfony

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/stereoflo-dbal-clickhouse/health.svg)

```
[![Health](https://phpackages.com/badges/stereoflo-dbal-clickhouse/health.svg)](https://phpackages.com/packages/stereoflo-dbal-clickhouse)
```

###  Alternatives

[martin-georgiev/postgresql-for-doctrine

Extends Doctrine with native PostgreSQL support for arrays, JSONB, ranges, PostGIS geometries, text search, ltree, uuid, and 100+ PostgreSQL-specific functions.

4485.3M4](/packages/martin-georgiev-postgresql-for-doctrine)[damienharper/auditor-bundle

Integrate auditor library in your Symfony projects.

4542.8M](/packages/damienharper-auditor-bundle)[sonata-project/entity-audit-bundle

Audit for Doctrine Entities

644989.8k1](/packages/sonata-project-entity-audit-bundle)[overtrue/laravel-versionable

Make Laravel model versionable.

585308.0k5](/packages/overtrue-laravel-versionable)[friendsofdoctrine/dbal-clickhouse

Doctrine DBAL driver for ClickHouse

1141.2M1](/packages/friendsofdoctrine-dbal-clickhouse)[cybercog/laravel-clickhouse

ClickHouse migrations for Laravel

163166.8k](/packages/cybercog-laravel-clickhouse)

PHPackages © 2026

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