PHPackages                             zk2/sps-dbal-component - 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. zk2/sps-dbal-component

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

zk2/sps-dbal-component
======================

SQL query builder for Doctrine DBAL

v2.0.3(2y ago)03.0k↓25%MITPHPPHP ^8.2

Since Aug 8Pushed 2y ago1 watchersCompare

[ Source](https://github.com/zk2/sps-dbal-component)[ Packagist](https://packagist.org/packages/zk2/sps-dbal-component)[ Docs](https://github.com/zk2/sps-dbal-component)[ RSS](/packages/zk2-sps-dbal-component/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (8)Versions (24)Used By (0)

Zk2\\SpsDbalComponent
=====================

[](#zk2spsdbalcomponent)

Often there is a need to provide the end user with the possibility of complex filtering any data. It is quite problematic to correctly place parentheses in the AND / OR set. It is even more problematic to filter / sort by value from the aggregating function.

The component is intended for building valid blocks "WHERE", "OFFSET", "LIMIT" and "ORDER BY" in `Doctrine\DBAL\Query\QueryBuilder`. Also, the component allows you to use result of aggregating functions in the blocks "WHERE" and "ORDER BY".

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

[](#documentation)

[Quick start](https://github.com/zk2/sps-dbal-component/blob/master/doc/quick_start.rst)

[Definitions](https://github.com/zk2/sps-dbal-component/blob/master/doc/definitions.rst)

[Usage](https://github.com/zk2/sps-dbal-component/blob/master/doc/usage.rst)

Running the Tests
-----------------

[](#running-the-tests)

Environment for tests inside `Docker`

It provides 3 DataBase engine (MySql, Postgres and SQLite) with fixtures.

For run tests:

```
cd tests/docker
docker-compose up -d
docker-compose exec php ./vendor/bin/phpunit

```

License
-------

[](#license)

This bundle is released under the MIT license. See the complete license in the bundle:

```
LICENSE

```

###  Health Score

38

—

LowBetter than 84% of packages

Maintenance31

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity77

Established project with proven stability

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

Recently: every ~11 days

Total

23

Last Release

757d ago

Major Versions

v1.1.8 → v2.0.02024-03-09

PHP version history (4 changes)v1.0.0PHP &gt;=7.4,&lt;8.0

v1.1.0PHP &gt;=7.4

v1.1.1PHP &gt;=7.4|^8.0

v2.0.0PHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/5300484274f8497c82b30539e2ed3393739956426fcc3b448781bec446a6babe?d=identicon)[zk2](/maintainers/zk2)

---

Top Contributors

[![zk2](https://avatars.githubusercontent.com/u/4775391?v=4)](https://github.com/zk2 "zk2 (28 commits)")

---

Tags

doctrinedbalsqlquery builder

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/zk2-sps-dbal-component/health.svg)

```
[![Health](https://phpackages.com/badges/zk2-sps-dbal-component/health.svg)](https://phpackages.com/packages/zk2-sps-dbal-component)
```

###  Alternatives

[fresh/doctrine-enum-bundle

Provides support of ENUM type for Doctrine2 in Symfony applications.

4636.8M12](/packages/fresh-doctrine-enum-bundle)[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)[cycle/database

DBAL, schema introspection, migration and pagination

64690.9k31](/packages/cycle-database)[mrjgreen/database

Expressive Database Layer for PHP - Based on Illuminate/Database

5347.8k10](/packages/mrjgreen-database)[flow-php/doctrine-dbal-bulk

Bulk inserts and updates for Doctrine DBAL

14295.2k1](/packages/flow-php-doctrine-dbal-bulk)[nilportugues/sql-repository

SQL Repository implementation

361.9k](/packages/nilportugues-sql-repository)

PHPackages © 2026

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