PHPackages                             evyex/doctrine-orm-extender - 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. evyex/doctrine-orm-extender

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

evyex/doctrine-orm-extender
===========================

Extension for Doctrine ORM.

0.2.0(2mo ago)00MITPHPPHP ^8.1CI passing

Since Jan 26Pushed 2mo agoCompare

[ Source](https://github.com/evyex/doctrine-orm-extender)[ Packagist](https://packagist.org/packages/evyex/doctrine-orm-extender)[ RSS](/packages/evyex-doctrine-orm-extender/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (4)Versions (7)Used By (0)

Doctrine ORM Extender
=====================

[](#doctrine-orm-extender)

Extension library for Doctrine ORM that builds `QueryBuilder`/`Query` from a declarative ruleset.

What It Does
------------

[](#what-it-does)

- Creates a `QueryBuilder` from `RuleSetInterface`
- Applies supported Doctrine expressions (`where`, `orderBy`, `groupBy`, `join`, `select`)
- Binds parameters from the ruleset
- Returns either a ready `QueryBuilder` or a final `Query`

Requirements
------------

[](#requirements)

- PHP `^8.1`
- `doctrine/orm` `^2.10|^3.0`

Install
-------

[](#install)

```
composer require evyex/doctrine-orm-extender
```

Example
-------

[](#example)

Without ruleset object, query logic is usually assembled inline in repository/service methods. With this package, the same logic can be moved to a dedicated business ruleset class:

```
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM\Query\Expr;
use Doctrine\ORM\Query\Parameter;
use Evyex\DoctrineOrmExtender\QueryFactory\RuleSetInterface;

final class ClientGroupDogs implements RuleSetInterface
{
    public function __construct(private int $clientGroupId)
    {
    }

    public function getEntityClass(): string
    {
        return Animal::class;
    }

    public function getRootAlias(): string
    {
        return 'a';
    }

    public function getRules(): array
    {
        return [
            new Expr\Join(Expr\Join::INNER_JOIN, 'a.client', 'c'),
            new Expr\Andx(['c.group = :clientGroupId']),
            new Expr\Andx(['a.type = :animalType']),
        ];
    }

    public function getParameters(): ArrayCollection
    {
        return new ArrayCollection([
            new Parameter('clientGroupId', $this->clientGroupId),
            new Parameter('animalType', 'dog'),
        ]);
    }
}
```

Then usage becomes explicit and reusable:

```
$dogs = $queryFactory
    ->createQuery(new ClientGroupDogs(5))
    ->getResult();
```

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance86

Actively maintained with recent releases

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity37

Early-stage or recently created project

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

Total

2

Last Release

72d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3cf6f7b34ef681a5e160feb9bb2eeb0050d0515b38e7c6f4bde489f3d87f86fd?d=identicon)[EvgenijVy](/maintainers/EvgenijVy)

---

Top Contributors

[![evgenij-vy](https://avatars.githubusercontent.com/u/120460020?v=4)](https://github.com/evgenij-vy "evgenij-vy (13 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/evyex-doctrine-orm-extender/health.svg)

```
[![Health](https://phpackages.com/badges/evyex-doctrine-orm-extender/health.svg)](https://phpackages.com/packages/evyex-doctrine-orm-extender)
```

###  Alternatives

[scienta/doctrine-json-functions

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

58523.9M35](/packages/scienta-doctrine-json-functions)[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)[pixelfederation/doctrine-resettable-em-bundle

Symfony bundle for decorating default entity managers using a resettable decorator.

20113.5k](/packages/pixelfederation-doctrine-resettable-em-bundle)[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.

1022.4k](/packages/rcsofttech-audit-trail-bundle)[ahmed-bhs/doctrine-doctor

Runtime analysis tool for Doctrine ORM integrated into Symfony Web Profiler. Unlike static linters, it analyzes actual query execution at runtime to detect performance bottlenecks, security vulnerabilities, and best practice violations during development with real execution context and data.

813.1k](/packages/ahmed-bhs-doctrine-doctor)

PHPackages © 2026

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