PHPackages                             ezsystems/query-builder-bundle - 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. ezsystems/query-builder-bundle

AbandonedArchivedEzplatform-bundle

ezsystems/query-builder-bundle
==============================

Fluent repository query builder for eZ Publish 5

51466PHP

Since Oct 29Pushed 3y agoCompare

[ Source](https://github.com/ezsystems/QueryBuilderBundle)[ Packagist](https://packagist.org/packages/ezsystems/query-builder-bundle)[ RSS](/packages/ezsystems-query-builder-bundle/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependenciesVersions (2)Used By (0)

eZ Publish Query Builder bundle
===============================

[](#ez-publish-query-builder-bundle)

[![Build Status](https://camo.githubusercontent.com/5700afe4f07478665841079071e599dece1859e733a5503831b63afc2362d229/68747470733a2f2f7472617669732d63692e6f72672f657a73797374656d732f51756572794275696c64657242756e646c652e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/ezsystems/QueryBuilderBundle) [![Coverage Status](https://camo.githubusercontent.com/1b1ef1598088dc7f6ede0d02074d4b00b916ba021081b789bb318f792722da53/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f657a73797374656d732f51756572794275696c64657242756e646c652f62616467652e706e673f6272616e63683d6d6173746572)](https://coveralls.io/r/ezsystems/QueryBuilderBundle)

This bundle for eZ Publish, the open-source CMS platform, provides a PHP API dedicated to fluently writing repository queries. It is built to provide **accurate** and contextually relevant **code completion** as long as a rich PHP IDE is used (**tested with PhpStorm, Eclipse and NetBeans**, works out of the box on all).

Status: prototype
-----------------

[](#status-prototype)

This bundle is provided as is. It is currently a working proof of concept:

- most metadata criteria will work (`parentLocationId`, `contentTypeIdentifier`, `dateModified`...)
- most metadata based sorting will work
- test coverage is quite high now, but quite a couple features aren't tested or working yet.

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

[](#installation)

From your eZ Publish 5 installation, run `composer require ezsystems/query-builder-bundle:dev-master`. Register the bundle in `ezpublish/EzPublishKernel.php:

```
    public function registerBundles()
    {
        $bundles = array(
            new FrameworkBundle(),
            // [...]
            new NelmioCorsBundle(),
            new EzSystems\QueryBuilderBundle\EzSystemsQueryBuilderBundle()
        );
```

Testing out the prototype
-------------------------

[](#testing-out-the-prototype)

A command is available that can be used to test the builder: `php ezpublish/console query-builder:test`. It will execute the query written in `vendor/ezsystems/query-builder-bundle/EzSystems/QueryBuilderBundle/Command/QueryBuilderTestCommand.php`, and print out the results as a table.

You can play with it, and test the various methods.

Usage
-----

[](#usage)

The builder is obtained from the Symfony2 service container. The fluent API is used to configure the query's options, and the `eZ\Publish\API\Values\Content\Query` object is obtained by using `getQuery()`:

```
/** @var \EzSystems\QueryBuilderBundle\eZ\Publish\API\QueryBuilder */
$queryBuilder = $container->get( 'ezpublish.api.query_builder' );

// Filter on articles within sections #6 & #7 that have 'query' in their 'title' field, sorted by name
in an ascending order:

$queryBuilder
    ->contentTypeIdentifier()->eq( 'article' )
    ->sectionId()->in( 6, 7 )
    ->textLineField( 'title' )->contains( 'CMS' )
    ->sortBy()->contentName()->ascending();

// Get the query
$query = $queryBuilder->getQuery();

// Run the query using the search service
$results = $container->get( 'ezpublish.api.service.search' )->find( $query );
```

License
-------

[](#license)

This bundle is under **[GPL v2.0 license](http://www.gnu.org/licenses/gpl-2.0.html)**.

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 66.7% 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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/235928?v=4)[Bertrand Dunogier](/maintainers/bdunogier)[@bdunogier](https://github.com/bdunogier)

---

Top Contributors

[![bdunogier](https://avatars.githubusercontent.com/u/235928?v=4)](https://github.com/bdunogier "bdunogier (4 commits)")[![andrerom](https://avatars.githubusercontent.com/u/289757?v=4)](https://github.com/andrerom "andrerom (1 commits)")[![johnnypeck](https://avatars.githubusercontent.com/u/254875?v=4)](https://github.com/johnnypeck "johnnypeck (1 commits)")

### Embed Badge

![Health badge](/badges/ezsystems-query-builder-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/ezsystems-query-builder-bundle/health.svg)](https://phpackages.com/packages/ezsystems-query-builder-bundle)
```

PHPackages © 2026

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