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

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

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

SQL/DQL query builder for Doctrine 2

v1.5.2(5y ago)29571MITPHPPHP &gt;=7.2CI failing

Since Aug 9Pushed 5y ago1 watchersCompare

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

READMEChangelog (10)Dependencies (7)Versions (35)Used By (1)

Zk2\\SpsComponent
=================

[](#zk2spscomponent)

[![Build Status](https://camo.githubusercontent.com/2e8aa3679930a9ff5efacb1377b7ee8fd37633b45de9946c88605adcb9279787/68747470733a2f2f7472617669732d63692e6f72672f7a6b322f535053436f6d706f6e656e742e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/zk2/SPSComponent)

[![Latest Stable Version](https://camo.githubusercontent.com/660d49dfc5327b8cbf1613c2fa7d8e1d98a2d51c65b29c99722dddd831c8f3ed/68747470733a2f2f706f7365722e707567782e6f72672f7a6b322f7370732d636f6d706f6e656e742f762f737461626c65)](https://packagist.org/packages/zk2/sps-component)[![Total Downloads](https://camo.githubusercontent.com/cc307a70154a7f81f3e47272631ff03e37a3721b5a6c01f82ecec686deeef106/68747470733a2f2f706f7365722e707567782e6f72672f7a6b322f7370732d636f6d706f6e656e742f646f776e6c6f616473)](https://packagist.org/packages/zk2/sps-component)[![Latest Unstable Version](https://camo.githubusercontent.com/97a7f70b2ccf8caf17b2b118e6b4dba10e7d79d8aa4a71c6d6fd86d0893f45ca/68747470733a2f2f706f7365722e707567782e6f72672f7a6b322f7370732d636f6d706f6e656e742f762f756e737461626c65)](https://packagist.org/packages/zk2/sps-component)[![License](https://camo.githubusercontent.com/fd9a14aed8865e3dc48ae9dac54fc2a31db6f25c76da8b2abe70b5097e8aee63/68747470733a2f2f706f7365722e707567782e6f72672f7a6b322f7370732d636f6d706f6e656e742f6c6963656e7365)](https://packagist.org/packages/zk2/sps-component)[![composer.lock](https://camo.githubusercontent.com/05ed39f41afad415c4bfe50f6168423687d252cb0a79456ce7f75dae4db36948/68747470733a2f2f706f7365722e707567782e6f72672f7a6b322f7370732d636f6d706f6e656e742f636f6d706f7365726c6f636b)](https://packagist.org/packages/zk2/sps-component)

[![SensioLabsInsight](https://camo.githubusercontent.com/adbd26b1bb9013e57983e3b76fbcbbd1487877f59ca8a356fc80f91a4be44715/68747470733a2f2f696e73696768742e73656e73696f6c6162732e636f6d2f70726f6a656374732f39326637646464342d303064392d346532622d616432332d6365363333666263663864342f6269672e706e67)](https://insight.sensiolabs.com/projects/92f7ddd4-00d9-4e2b-ad23-ce633fbcf8d4)

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` | `Doctrine\ORM\QueryBuilder`. Also, the component allows you to use aggregating functions in the blocks "WHERE" and "ORDER BY".

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

[](#documentation)

[Quick start](https://github.com/zk2/SPSComponent/blob/master/doc/quick_start.rst)

[Definitions](https://github.com/zk2/SPSComponent/blob/master/doc/definitions.rst)

[Usage](https://github.com/zk2/SPSComponent/blob/master/doc/usage.rst)

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

[](#running-the-tests)

Install the [Composer](http://getcomposer.org/) `dev` dependencies:

```
php composer.phar install --dev

```

Then, run the test suite using [PHPUnit](https://github.com/sebastianbergmann/phpunit/):

```
vendor/bin/phpunit

```

License
-------

[](#license)

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

```
LICENSE

```

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity70

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

Recently: every ~65 days

Total

34

Last Release

1962d ago

PHP version history (6 changes)v1.0.0PHP &gt;=5.6

v1.0.10PHP ^5.5.9|&gt;=7.0.8

v1.1.0PHP &gt;=7.0,&lt;8.0

v1.2.1PHP &gt;=7.1,&lt;8.0

v1.5.0PHP &gt;=7.1

v1.5.1PHP &gt;=7.2

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/4775391?v=4)[Evgeniy Budanov](/maintainers/zk2)[@zk2](https://github.com/zk2)

---

Top Contributors

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

---

Tags

dqlsqlquery builder

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k17.5M373](/packages/easycorp-easyadmin-bundle)[scienta/doctrine-json-functions

A set of extensions to Doctrine that add support for json query functions.

58725.2M48](/packages/scienta-doctrine-json-functions)[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.

4535.7M4](/packages/martin-georgiev-postgresql-for-doctrine)[open-dxp/opendxp

Content &amp; Product Management Framework (CMS/PIM)

9317.2k55](/packages/open-dxp-opendxp)[rcsofttech/audit-trail-bundle

Enterprise-grade, high-performance Symfony audit trail bundle. Automatically track Doctrine entity changes with split-phase architecture, multiple transports (HTTP, Queue, Doctrine), and sensitive data masking.

1155.2k](/packages/rcsofttech-audit-trail-bundle)[2lenet/crudit-bundle

The easy like Crud'it Bundle.

1615.6k12](/packages/2lenet-crudit-bundle)

PHPackages © 2026

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