PHPackages                             ncphillips/laravel-doctrine-query - 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. ncphillips/laravel-doctrine-query

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

ncphillips/laravel-doctrine-query
=================================

Ergonomic querying traits for Doctrine Entities in Laravel

v0.1.0(today)00MITPHP ^8.2|^8.3|^8.4

Since Jun 11Compare

[ Source](https://github.com/ncphillips/laravel-doctrine-query)[ Packagist](https://packagist.org/packages/ncphillips/laravel-doctrine-query)[ Docs](https://github.com/ncphillips/laravel-doctrine-query)[ RSS](/packages/ncphillips-laravel-doctrine-query/feed)WikiDiscussions Synced today

READMEChangelogDependencies (6)Versions (5)Used By (0)

Laravel Doctrine Query
======================

[](#laravel-doctrine-query)

Ergonomic querying traits for Doctrine entities in Laravel.

This package gives Doctrine entities an Eloquent-flavoured static query API so you can write `User::find(1)` instead of reaching for the EntityManager and a repository at every call site.

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

[](#installation)

```
composer require ncphillips/laravel-doctrine-query
```

The service provider is registered automatically via Laravel package discovery.

Usage
-----

[](#usage)

Add the `Queryable` trait to a Doctrine entity:

```
use Doctrine\ORM\Mapping as ORM;
use Ncphillips\LaravelDoctrineQuery\Queryable;

#[ORM\Entity]
class User
{
    use Queryable;

    // ...
}
```

You can then query it statically:

```
User::all();                              // array
User::find($id);                          // ?User
User::findBy(['admin' => true]);          // array
User::findOneBy(['name' => 'Ada']);       // ?User
User::count(['admin' => true]);           // int

User::query()                             // Doctrine\ORM\QueryBuilder, aliased "user"
    ->where('user.admin = :admin')
    ->setParameter('admin', true)
    ->getQuery()
    ->getResult();
```

The EntityManager is resolved from the Laravel container on demand, so entities stay free of any constructor wiring.

Development
-----------

[](#development)

```
composer install
composer test     # Pest + Orchestra Testbench, integration tests against SQLite
composer lint     # Laravel Pint
```

Release
-------

[](#release)

This project uses [Conventional Commits](https://www.conventionalcommits.org/) and [git-cliff](https://git-cliff.org/) to manage releases.

```
# Bump version, tag, and generate changelog
git cliff --bump --tag   # bumps version based on commits since last tag

# Or specify the version explicitly
git cliff --bump --tag --unreleased --prepend CHANGELOG.md

# Generate changelog from scratch (first release)
git cliff --prepend CHANGELOG.md
```

The workflow:

1. Merge feature/fix branches with conventional commit messages
2. Run `git cliff --bump` to determine the next version from commit history
3. Review and commit the updated `CHANGELOG.md` and version bump
4. Tag the release (git-cliff creates the tag with `--tag`)
5. Push tags: `git push --tags`

License
-------

[](#license)

MIT

###  Health Score

39

—

LowBetter than 84% of packages

Maintenance100

Actively maintained with recent releases

Popularity0

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

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

Unknown

Total

1

Last Release

0d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/be7d358fc7d7d1d0451e14aecccfd2f40bca26ad8374f174599b1e4df62e5124?d=identicon)[nolanos](/maintainers/nolanos)

---

Tags

laraveldoctrinequery

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/ncphillips-laravel-doctrine-query/health.svg)

```
[![Health](https://phpackages.com/badges/ncphillips-laravel-doctrine-query/health.svg)](https://phpackages.com/packages/ncphillips-laravel-doctrine-query)
```

###  Alternatives

[anourvalar/eloquent-serialize

Laravel Query Builder (Eloquent) serialization

11223.5M33](/packages/anourvalar-eloquent-serialize)[statamic-rad-pack/runway

Eloquently manage your database models in Statamic.

135224.7k8](/packages/statamic-rad-pack-runway)[laravel-doctrine/acl

ACL for Laravel and Doctrine

44476.5k7](/packages/laravel-doctrine-acl)

PHPackages © 2026

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